I use TermEnum for this sort of "browsing" on untokenized, unstored fields e.g. TermEnum terms=reader.terms(new Term("mybrowsefld","harr")).
-Gary
Matt Schraeder wrote:
Corerct me if I'm wrong, but I don't think n-grams is really what I'm
looking for here.  I'm not looking for a spellchecker or phrase checker
style suggestive search, but only based on the exact phrases the user is
currently typing.  Since Lucene uses term-based searching, I'm not sure
how to have it search on portions of a full phrase.  Using a standard
lucene search typing in "harr" will result in searching for "harr" as a
term, which will not find "Harry Potter".  Using ngrams it would find
"Harry" as a term, but not at the beginning of an entire phrase.  This
would bring back "My Dog Harry" as a result, which isn't what I'm
looking for. I just want phrases from fields beginning with "Harr"
only.
I could easily do this all with our database server by simply doing a
query for "where searchqueries like 'harr%'" but we're trying to limit
our hits to the database to keep speed up on the site.




---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to