FAQ
Hello all,
I have a how-to question. I have a field with these tokens in it (a b c f b g a) and I am searching on it with these tokens (a f e g a). So far this is easy I just set up a BooleanQuery with a bunch of optional TermQueries and get hits on (a f g a) but not (e) which is close to what I want. Now the part I am having difficulties with, I want to only find document that have those search tokens in order. Search (a f e g a) gets a hit, search (a f g e a) would not. A PhraseQuery expects all the search terms to be there but is close to what I want. Currently I do the set of TermQueries then filter out any document that does not have the terms in the right order as I am displaying them. I do not cycle through the entire Hits object, just enough to get something to display This works but then I never know the real count of found documents without going through all of them, which is slow. The option I am pondering is writing my own Query object but I'd rather find an easier
solution. Any thoughts?

Thanks,
Richard K.


---------------------------------
8:00? 8:25? 8:40? Find a flick in no time
with theYahoo! Search movie showtime shortcut.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
groupjava-user @
categorieslucene
postedMar 21, '07 at 1:07a
activeMar 21, '07 at 1:23a
posts2
users2
websitelucene.apache.org

2 users in discussion

Erick Erickson: 1 post Santa Clause: 1 post

People

Translate

site design / logo © 2022 Grokbase