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

Uwe Schindler commented on LUCENE-3628:
---------------------------------------

Hi I did not yet understand the patch completely, only two things recognized 
without close review:
- Lucene40Codec now imports 3x NormsFormat but it should not use it, I think 
thats obsolete but maybe there is some backwards compatibility invisible to me
- byte[] SegmentReader.norms() has less null checks than the new DocValues 
normsValues() method. Maybe the "old" norms() using byte should simply delegate 
to the new method, and return the inner byte[]:

{code:java}
public byte[] norms(String field) throws IOException {
  // ensureOpen() is called by normValues():
  final DocValues docValues = this.normValues(field);
  if (docValues != null) {
    Source source = docValues.getSource();
    assert source.hasArray(); // TODO cut over to source
    return (byte[])source.getArray();  
  }
  return null;
}
{code}

Maybe this method impl should be in the top-level IndexReader class as final 
method that delegates to the abstract normValues?

Otherwise initial patch looks fine!
                
> Cut Norms over to DocValues
> ---------------------------
>
>                 Key: LUCENE-3628
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3628
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: core/index, core/search
>    Affects Versions: 4.0
>            Reporter: Simon Willnauer
>            Assignee: Simon Willnauer
>             Fix For: 4.0
>
>         Attachments: LUCENE-3628.patch
>
>
> since IR is now fully R/O and norms are inside codecs we can cut over to use 
> a IDV impl for writing norms. LUCENE-3606 has some 
> [ideas|https://issues.apache.org/jira/browse/LUCENE-3606?focusedCommentId=13160559&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13160559]
>  about how this could be implemented

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to