Partial term query by default

My customers seem to expect that the world of search is dictated by
Google. As such they expect all queries except phrase queries to
include partial term hits. In other words, searching on “test” also
returns “testing”.

Is there a quick option to enable this or anyway more elegant than
gsub’ing the query to add asterisks around each term (except those in
phrases of course)?

Thanks,

-bryan

On Thu, Jul 19, 2007 at 11:34:19PM +0200, Bryan Wilkerson wrote:

My customers seem to expect that the world of search is dictated by
Google. As such they expect all queries except phrase queries to
include partial term hits. In other words, searching on “test” also
returns “testing”.

With a Stemmer included in your analyzer ‘testing’ would actually be
indexed as ‘test’ and therefore get found with a query for ‘test’.
Of course this won’t help if you expect to find ‘tree’ when searching
for ‘tr’, in this case you’ll have to build wildcard queries from the
terms of the query.

Here’s an example for a custom analyzer using a StemFilter:

http://www.ruby-forum.com/topic/90606#new

Jens


Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[email protected] | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa