lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nadav Har'El" <...@math.technion.ac.il>
Subject Combining Hits and HitCollector
Date Tue, 27 Jun 2006 16:08:23 GMT
Hi,

Searcher.search(Query) returns a Hits object, useful for the display of top
results. Searcher.search(Query, HitCollector) runs a HitsCollector for doing
some sort of processing over all results.
Unfortunately, there is currently no method to do both at the same time.

For some uses, for example faceted search (that was discussed on this list
a few times in the past), you need to do both: go over all results (and,
for example, count how many results belong to each value), and at the same
time build a Hits object (for displaying the top search results).

Changing Searcher, and/or Hits to allow for doing both things at once should
not be too hard, but before I go and do it (and submit the change as a patch),
I was wondering if I'm not reinventing the wheel, and if perhaps someone has
already done this, or there were already discussions on how or how not to do
it.

Thanks,
Nadav.


-- 
Nadav Har'El                        |      Tuesday, Jun 27 2006, 1 Tammuz 5766
IBM Haifa Research Lab              |-----------------------------------------
                                    |Unix is user friendly - it's just picky
http://nadav.harel.org.il           |about its friends.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message