[ 
https://issues.apache.org/jira/browse/LUCENE-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12744824#action_12744824
 ] 

Hoss Man commented on LUCENE-1821:
----------------------------------

bq. you are caching from external id to ord - its really not something I think 
we intend to support. The fact that we don't support it is why we were able to 
make this change. The FieldCache is the caching mechanism that Lucene supports 
with internal ids - and it supports it per segment.

I think Tim's got a valid point though about wanting an ordinal value across 
the entire index ... he's not using external ids, he's using the internal 
lucene docIds, and wants to know the ordinal value of a field for each doc 
across the entire index -- as he said, he's essentially using a 
FieldCache.StringIndex he just doesn't care about the String[] part.

Solr had/has the same problem with some of the function queries that wanted 
ordinal values (or the min/max field value for the whole index) that i think 
yonik just punted on and fetched the outermost field cache anyway ... we just 
weren't using it inside the Weight class, so we didn't encounter the specified 
problem Tim did.


> Weight.scorer() not passed doc offset for "sub reader"
> ------------------------------------------------------
>
>                 Key: LUCENE-1821
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1821
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>    Affects Versions: 2.9
>            Reporter: Tim Smith
>
> Now that searching is done on a per segment basis, there is no way for a 
> Scorer to know the "actual" doc id for the document's it matches (only the 
> relative doc offset into the segment)
> If using caches in your scorer that are based on the "entire" index (all 
> segments), there is now no way to index into them properly from inside a 
> Scorer because the scorer is not passed the needed offset to calculate the 
> "real" docid
> suggest having Weight.scorer() method also take a integer for the doc offset
> Abstract Weight class should have a constructor that takes this offset as 
> well as a method to get the offset
> All Weights that have "sub" weights must pass this offset down to created 
> "sub" weights

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to