lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walter Underwood <>
Subject Re: Searching multiple terms and mapping each term with their search result.
Date Thu, 03 Aug 2017 00:07:30 GMT
I’d do multiple queries in parallel. It is super easy with Solr. Send each query request,
then go back and read each response. They happen in parallel without any threads in the client.

If you want the total, then do another query. It will share cached posting lists with the
other queries, so they’ll all be fast together.

Walter Underwood  (my blog)

> On Aug 2, 2017, at 3:11 PM, Michael McCandless <> wrote:
> Do you really need to know which term/s caused a given hit for every single hit, or only
for the top N hits?
> If you must know this for every single hit, you should make your own Collector and use
the Scorer.getChildren API to gather the sub-scorer for each term, and on collecting each
hit, look at those children to see which ones matched the current hit.
> If it's only for the top N hits, it's more efficient to do a 2nd step with those hits
where you test each term separately to see if they match it.
> Mike McCandless
> <>
> On Wed, Aug 2, 2017 at 1:48 AM, Sarthak Sugandhi < <>>
> Hi Fellow Luceneers,
> I am trying to search multiple terms in an index at one go and I want to differentiate
search results for each term all in the same query.
> Could you suggest what is the class/method name.
> Thanks,
> Sarthak

View raw message