lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <>
Subject Re: How to retrieve value of NumericDocValuesField in similarity
Date Mon, 12 Aug 2013 16:02:52 GMT
On Mon, Aug 12, 2013 at 8:48 AM, Ross Woolf <> wrote:
> Okay, just for clarity sake, what you are saying is that if I make the
> FieldCache call it won't actually create and impose the loading time of the
> FieldCache, but rather just use the NumericDocValuesField instead.  Is this
> correct?

Yes, exactly. its a little confusing, but a tradeoff to make docvalues
work transparently with lots of existing code built off of fieldcache
(sorting/grouping/joins/faceting/...) without having to have 2
separate implementations of what is the same thing. so its like
"docvalues is a fieldcache you already built at index-time".

> Also, my similarity was extending SimilarityBase, and I can't see how to
> get a docId as it is not passed in the score method "score(BasicStats
> stats, float freq, float docLen)".  Will I need to extend using Similarity
> instead of SimilarityBase, or is there a way to get the docId using
> SimilarityBase?

Maybe we should just add a 'int doc' parameter to the
SimilarityBase.score() method? Do you want to open a JIRA issue for

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message