lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Missing Searcher.search() signature
Date Wed, 16 May 2007 17:30:24 GMT
: However, existing Searcher.search() signatures only accept either HitCollector or
: Sort, but not both.
:
: Is there some special reason why this signature doesn't exist or is it just because every
: possible permutation would be too much (stricly speaking I miss the nDocs argument as well
:)?

it doesn't exist because it would be kind of meaningless ... if you want
Lucene to Sort for you then it (internally) has to "collect" all of the
documents anyway.  If you want to use your own HitCollector then you can
easily Sort the docs yourself.

HitCollector is an advanced API that gives the client code direct control
over the result processing, while the Sort class is designed more for
beginiers / simple apps / novice users ...  mixing them would not only be
a little odd, but also ambiguous.


-Hoss


---------------------------------------------------------------------
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