lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Schraeder" <MSchrae...@btsb.com>
Subject Suggestive Search
Date Wed, 08 Apr 2009 13:26:48 GMT
I want to add a suggestive search similar to google's to autocomplete
search phrases as the user types.  It doesn't have to be very elaborate
and for the most part will just involve searching single fields.  How
can I perform a search  to be able to fill in autocomplete text?
 
For instance, if I start typing "Harr" it should bring up "Harry
Potter" "Harry Houdini" and "Harry S. Truman"
 
I have tried doing search queries for "Harr*" but it's still doing
term-based searching rather than searching a full field.  To make a
field both searchable as the full field as well as tokenized, would I
have to duplicate the field and make one a keyword field? Is there a
more convenient way to do this? I have also considered making a second
index for suggestive search, which would only have the fields that I
want to enable suggestive search on, but this seems like it would be
unneccesary duplication of data as well, though it would probably make
suggestive search faster due to a smaller index.
 
Ideally it would also be nice to be able to rank these terms based on
the number of times they have been searched for so that the results are
tailored more to our users rather than simply just the score that Lucene
chooses.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message