Re: TSDC, TopFieldCollector & co

2009-09-30 Thread eks dev
About clear(Object sentinel) - is it still a question no, it is not. Makes no sense with mutable elements :) - Original Message > From: Shai Erera > To: java-user@lucene.apache.org > Sent: Wednesday, 30 September, 2009 21:02:19 > Subject: Re: TSDC, TopFieldCollector &am

Re: TSDC, TopFieldCollector & co

2009-09-30 Thread Shai Erera
el; > } > size = maxSize; >} > > getSentinelObject() creates new object every time (HitQueue) > > are these objects mutable? > > > > > > > > - Original Message > > From: Shai Erera > > To: java-user@lucene.apache.org &g

Re: TSDC, TopFieldCollector & co

2009-09-30 Thread eks dev
, 2009 20:41:51 > Subject: Re: TSDC, TopFieldCollector & co > > > BTW eks, you asked about reusing TSDC. > > yeah, it is normally not a big deal to allocate everything again, but these > arrays are not necessarily small, I guess it would make sense to open this >

Re: TSDC, TopFieldCollector & co

2009-09-30 Thread eks dev
ntinel; } size = maxSize; } getSentinelObject() creates new object every time (HitQueue) are these objects mutable? - Original Message > From: Shai Erera > To: java-user@lucene.apache.org > Sent: Wednesday, 30 September, 2009 18:11:03 > Subject: Re: TSDC,

Re: TSDC, TopFieldCollector & co

2009-09-30 Thread Shai Erera
; should be used..., BQ will pick the right TSDC ... I like it, > option 1 it is minimum user code. > > Cheers, eks > > > > - Original Message > > From: Shai Erera > > To: java-user@lucene.apache.org > > Sent: Wednesday, 30 September, 2009 17:12:38 &

Re: TSDC, TopFieldCollector & co

2009-09-30 Thread eks dev
is minimum user code. Cheers, eks - Original Message > From: Shai Erera > To: java-user@lucene.apache.org > Sent: Wednesday, 30 September, 2009 17:12:38 > Subject: Re: TSDC, TopFieldCollector & co > > I agree. If you need sort-by-score, it's better to use the &qu

Re: TSDC, TopFieldCollector & co

2009-09-30 Thread eks dev
is minimum user code. Cheers, eks - Original Message > From: Shai Erera > To: java-user@lucene.apache.org > Sent: Wednesday, 30 September, 2009 17:12:38 > Subject: Re: TSDC, TopFieldCollector & co > > I agree. If you need sort-by-score, it's better to use the &qu

Re: TSDC, TopFieldCollector & co

2009-09-30 Thread Shai Erera
I agree. If you need sort-by-score, it's better to use the "fast" search methods. IndexSearcher will create the appropriate TSDC instance for you, based on the Query that was passed. If you need to create multiple Collectors and pass a kind of Multi-Collector to IndexSearcher, then you should crea

Re: TSDC, TopFieldCollector & co

2009-09-30 Thread Mark Miller
If you want relevance sorting (Sort.Score not Sort.Relevance right?), I'd think you want to use TopScoreDocCollector, not TopFieldCollector. The only reason to use relevance with TopFieldCollector is if you you are doing a nth sort with a field sort as well. You don't really need to worry about th

Re: TSDC, TopFieldCollector & co

2009-09-30 Thread eks dev
. - Original Message > From: eks dev > To: java-user@lucene.apache.org > Sent: Wednesday, 30 September, 2009 11:43:26 > Subject: TSDC, TopFieldCollector & co > > Hi All, > > What is the best way to achieve the following and what are the differences, >

TSDC, TopFieldCollector & co

2009-09-30 Thread eks dev
Hi All, What is the best way to achieve the following and what are the differences, if I say "I do not normalize scores, so I do not need max score tracking, I do not care if hits are returned in doc id order, or any other order. I need only to get maxDocs *best scoring* documents": OPTION 1: