Skip to content

A new search engine

January 27, 2011

Internet is a world of new stuff. One interesting area is the way Google has used its own search engine and included the search proposal while you are typing your search.

And, why don’t we use the same with GUI programs (I mean applications having a heavy client side, typically not a web driven interface). In many enterprise software, it is usual to find a complete screen to search a client or anything and the interface propose a list of criteria to search the correct data in the database: the name of the client, its phone… This type of search have several drawbacks:

  • You need to enter the correct information in the correct field (the name in the name field).
  • You have to click on the search button to run the query in the database.
  • Your database is usually requested on such “SELECT … FROM … WHERE NAME LIKE ‘%DOE%'” to find someone like JOHN DOE. And the use of the LIKE constraint will generate a full scan of the table, without using the indexes.

There are some concerns: the human interface is not very powerful and the database is doing some heavy requests to filter the data. Then, why not using a new way for your software?

Do the same as for websites: instead of providing a dedicated screen for searching a client, provide a combobox in which data are provided, not by the database, but by a text indexor (like Lucene). Programming like this gives you 2 advantages: you don’t have to write a specific screen with an interaction with your field and you do not ask heavy requests to the database (even if many databases provides now fully indexed text): you just have to request to Lucene: the data will be retrieved from all the fields of your client without the need to explain which field is concerned.

The drawback of this is the installation of Lucene (to be done on the middleware server) and to provide the information to Lucene meaning each update should also update the Lucene dictionnary.

I have taken the example of the client but imagine you are working for a bank, you can have to enter securities: in this case, you have to search it through its name (like “MICROSOFT”) but also based on its ISIN code (an unique 13 digits identifier), its ticker code… And many data can be retrieved simply by putting all the characteristics in the Lucene engine.

Advertisements

From → Other

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: