See the question was so trivial that you actually missed it :)
The problem is that the docs are filtered (which is is great) but the stats
(BasicStats) aren't, i.e. the stats have been calculated over the whole index
and not just a selected set of documents. For example:
Filter filter = new FieldCacheTermsFilter("QNO", queryNumber);
searcher.search(qq, filter, collector);
....
stats.getNumberOfDocuments();
I only want to consider certain docs per query. The filter achieves that in
terms of matching and the returned the results. However, the calculated score
for each document has been calculated using the stats over the whole index and
not just the filtered documents. Is there a way to calculate the stats only
over the filtered documents?
I hope the problem is a bit clearer now.
Thank you.
h.
On 10 Feb 2012, at 18:27, Uwe Schindler wrote:
> Whats the problem?
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: [email protected]
>
>
>> -----Original Message-----
>> From: Hany Azzam [mailto:[email protected]]
>> Sent: Friday, February 10, 2012 6:43 PM
>> To: [email protected]
>> Subject: Re: Filter and IndexSearcher in Lucene 4.0 (trunk)
>>
>> Hi,
>>
>> I apologise upfront for the trivial question. I have an IndexSearcher and
> I am
>> applying a FieldCacheTermsFilter filter on it to only retrieve documents
> whose
>> single docId is in a provided set of allowed docIds. I am particularly
> interested
>> in the stats being estimated over the accepted set of documents. However,
> the
>> filtering is not working. Am I missing something here?
>>
>> h.
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]