lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <yo...@lucidimagination.com>
Subject Re: Making TopDocCollector a bit more consumable
Date Mon, 24 Aug 2009 14:31:55 GMT
But creating the collector is expert use, right?
The normal use would be from Searcher:
TopDocs search(Query query, int n)
TopDocs search(Query query, Filter filter, int n)


-Yonik
http://www.lucidimagination.com



On Mon, Aug 24, 2009 at 10:15 AM, Mark Miller<markrmiller@gmail.com> wrote:
> Hey all,
>
> Hits, which used to be the non expert search API has been deprecated -
> so TopDocs is now
> essentially the non expert search API. But when you go to use it you are
> greeted with:
>
>  public static TopFieldCollector create(Sort sort, int numHits,
>      boolean fillFields, boolean trackDocScores, boolean trackMaxScore,
>      boolean docsScoredInOrder)
>
> and
>
>  public static TopScoreDocCollector create(int numHits, boolean
> docsScoredInOrder) {
>
>    if (docsScoredInOrder) {
>      return new InOrderTopScoreDocCollector(numHits);
>    } else {
>      return new OutOfOrderTopScoreDocCollector(numHits);
>    }
>
>  }
>
> Woah ! Think of the poor noobies ;)
>
> I don't know if I want my docs scored in order. Seriously, I don't. Its
> sounds nice though. And fill fields? Please do I guess :)
>
> What do you think about having versions that default to something
> reasonable ? And you just have to give numhits and sort, numhits?
>
> This API now has a dual role IMO - expert and non expert.
>
> --
> - Mark
>
> http://www.lucidimagination.com
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>

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