lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Digy" <digyd...@gmail.com>
Subject RE: Multiple queries
Date Fri, 07 Mar 2008 18:57:37 GMT
Retrieving the fields from the index is a costly operation. If your combined
search returns a large number of hits then it can be too costly to get all
the results form the index to check which field's caused that match.
Therefore making separate searches, getting the hitcounts and top n-results
can be faster(I think).

DIGY.

-----Original Message-----
From: Max Metral [mailto:max@artsalliancelabs.com] 
Sent: Thursday, March 06, 2008 1:25 PM
To: lucene-net-dev@incubator.apache.org
Subject: Multiple queries

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



Mime
View raw message