I have an app where I take a search string and split it into "tags"
(i.e. categories) and regular text.  I then use homegrown logic for tag
matches, because it's faster/more efficient, and then correlate that
with text results from Lucene.  So the pathological example was a search
for "atlantic fish".  That's a restaurant name, but "fish" is also a
tag, and it's not tagged with that so it's not matched.

 

So what I would like to do is say "find the text (TermQuery), but also
find a title match (using PhraseQuery)".  That part is easy.  The trick
is I need to know for each text result which of those queries was
responsible for the match.  Which finally brings me to my question: Is
it faster to do two searches, or one search and explain each result, or
something entirely different?

 

Thanks!

--Max

Reply via email to