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

Mark Miller commented on LUCENE-1749:
-------------------------------------

bq. the explain method wants to get hte FieldCache value for a doc, it should 
fetch the FieldCache for the SegmentReader the doc is in

One more note to try and be a bit more clear:

First, I wasn't sure how easy this was to do because I don't know explain code 
or the function package very well at all (eg I've never used it). And the 
explain method itself did not grab values from the field cache, it loaded up a 
scorer that did so. So I just wasn't sure how doable this fix was. Thats why I 
was saying pushing down explain to the subreader wasn't great, but I wasn't 
sure what else you could do. The fix turned out to be fairly easy though - the 
scorer for valuesource just needed two modes - one for normal scoring and one 
for explain (that breaks up the requests for a fieldcache val per sub reader) - 
the explain method would work for both ways, but no reason to try and break 
down per reader when its going to score per reader anyway, so I have both. 
Standard scorer for valuesource works as it did, and explain trips a setting to 
break out subreaders and distrib fieldcache requests. And then the custom query 
needed a tweak to work right (flip that setting) with its underlying 
valuesource queries.



> FieldCache introspection API
> ----------------------------
>
>                 Key: LUCENE-1749
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1749
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>            Reporter: Hoss Man
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: fieldcache-introspection.patch, 
> LUCENE-1749-hossfork.patch, LUCENE-1749.patch, LUCENE-1749.patch, 
> LUCENE-1749.patch, LUCENE-1749.patch, LUCENE-1749.patch, LUCENE-1749.patch, 
> LUCENE-1749.patch
>
>
> FieldCache should expose an Expert level API for runtime introspection of the 
> FieldCache to provide info about what is in the FieldCache at any given 
> moment.  We should also provide utility methods for sanity checking that the 
> FieldCache doesn't contain anything "odd"...
>    * entries for the same reader/field with different types/parsers
>    * entries for the same field/type/parser in a reader and it's subreader(s)
>    * etc...

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