You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (Created) (JIRA)" <ji...@apache.org> on 2012/03/09 21:12:59 UTC

[jira] [Created] (LUCENE-3859) nuke/clean up AtomicReader.hasNorms

nuke/clean up AtomicReader.hasNorms
-----------------------------------

                 Key: LUCENE-3859
                 URL: https://issues.apache.org/jira/browse/LUCENE-3859
             Project: Lucene - Java
          Issue Type: Task
    Affects Versions: 4.0
            Reporter: Robert Muir


implementations already have to return fieldInfos() [which can tell you this], and normValues() [which can also tell you this].

So if we want to keep it, I think it should just have a final implementation and not be required for FilterReaders, etc.

Or we can just nuke it... do we really need 3 ways to do the same thing?

--
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (LUCENE-3859) nuke/clean up AtomicReader.hasNorms

Posted by "Robert Muir (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-3859:
--------------------------------

    Attachment: LUCENE-3859.patch
    
> nuke/clean up AtomicReader.hasNorms
> -----------------------------------
>
>                 Key: LUCENE-3859
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3859
>             Project: Lucene - Java
>          Issue Type: Task
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-3859.patch
>
>
> implementations already have to return fieldInfos() [which can tell you this], and normValues() [which can also tell you this].
> So if we want to keep it, I think it should just have a final implementation and not be required for FilterReaders, etc.
> Or we can just nuke it... do we really need 3 ways to do the same thing?

--
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (LUCENE-3859) nuke/clean up AtomicReader.hasNorms

Posted by "Robert Muir (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-3859:
--------------------------------

    Attachment: LUCENE-3859.patch

Updated patch: same approach as before, except with some related cleanups.

FieldInfos are now public from IndexReader in 4.0, but javadoc is sparse and some naming is inconsistent.

Patch renames FieldInfos.anyDocValuesFields() to FieldInfos.hasDocValues(), consistent with hasProx(), hasNorms(), and hasFreq().

Patch also renames FieldInfo.normsPresent() to FieldInfo.hasNorms(), consistent with hasDocValues(), and consistent with the naming in FieldInfoS.

Also i added some additional javadoc.
                
> nuke/clean up AtomicReader.hasNorms
> -----------------------------------
>
>                 Key: LUCENE-3859
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3859
>             Project: Lucene - Java
>          Issue Type: Task
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-3859.patch, LUCENE-3859.patch
>
>
> implementations already have to return fieldInfos() [which can tell you this], and normValues() [which can also tell you this].
> So if we want to keep it, I think it should just have a final implementation and not be required for FilterReaders, etc.
> Or we can just nuke it... do we really need 3 ways to do the same thing?

--
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Resolved] (LUCENE-3859) nuke/clean up AtomicReader.hasNorms

Posted by "Robert Muir (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir resolved LUCENE-3859.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0
    
> nuke/clean up AtomicReader.hasNorms
> -----------------------------------
>
>                 Key: LUCENE-3859
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3859
>             Project: Lucene - Java
>          Issue Type: Task
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>             Fix For: 4.0
>
>         Attachments: LUCENE-3859.patch, LUCENE-3859.patch, LUCENE-3859.patch
>
>
> implementations already have to return fieldInfos() [which can tell you this], and normValues() [which can also tell you this].
> So if we want to keep it, I think it should just have a final implementation and not be required for FilterReaders, etc.
> Or we can just nuke it... do we really need 3 ways to do the same thing?

--
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3859) nuke/clean up AtomicReader.hasNorms

Posted by "Michael McCandless (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227043#comment-13227043 ] 

Michael McCandless commented on LUCENE-3859:
--------------------------------------------

+1
                
> nuke/clean up AtomicReader.hasNorms
> -----------------------------------
>
>                 Key: LUCENE-3859
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3859
>             Project: Lucene - Java
>          Issue Type: Task
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-3859.patch, LUCENE-3859.patch
>
>
> implementations already have to return fieldInfos() [which can tell you this], and normValues() [which can also tell you this].
> So if we want to keep it, I think it should just have a final implementation and not be required for FilterReaders, etc.
> Or we can just nuke it... do we really need 3 ways to do the same thing?

--
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (LUCENE-3859) nuke/clean up AtomicReader.hasNorms

Posted by "Robert Muir (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-3859:
--------------------------------

    Attachment: LUCENE-3859.patch

Updated patch: keeps AtomicReader.hasNorms but changes its implementation to just check the fieldinfos (so it wont load anything/incur any i/o).

its final and deprecated, as its basically just sugar for the fieldinfos check, which you can do yourself (and also allows you to get the type of the norms too).

                
> nuke/clean up AtomicReader.hasNorms
> -----------------------------------
>
>                 Key: LUCENE-3859
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3859
>             Project: Lucene - Java
>          Issue Type: Task
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-3859.patch, LUCENE-3859.patch, LUCENE-3859.patch
>
>
> implementations already have to return fieldInfos() [which can tell you this], and normValues() [which can also tell you this].
> So if we want to keep it, I think it should just have a final implementation and not be required for FilterReaders, etc.
> Or we can just nuke it... do we really need 3 ways to do the same thing?

--
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3859) nuke/clean up AtomicReader.hasNorms

Posted by "Robert Muir (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227066#comment-13227066 ] 

Robert Muir commented on LUCENE-3859:
-------------------------------------

One thing about this patch: it removes the method but I am scared to backport the deprecation,
because I'm not sure 3.x fieldinfos really "knows" this.

So I think a good solution is to have a deprecated hasNorms sugar method in AtomicReader that is final,
and sugar for fieldinfo.hasNorms(). This way we avoid a hard break, we can just remove this for the 
next major release.
                
> nuke/clean up AtomicReader.hasNorms
> -----------------------------------
>
>                 Key: LUCENE-3859
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3859
>             Project: Lucene - Java
>          Issue Type: Task
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-3859.patch, LUCENE-3859.patch
>
>
> implementations already have to return fieldInfos() [which can tell you this], and normValues() [which can also tell you this].
> So if we want to keep it, I think it should just have a final implementation and not be required for FilterReaders, etc.
> Or we can just nuke it... do we really need 3 ways to do the same thing?

--
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3859) nuke/clean up AtomicReader.hasNorms

Posted by "Uwe Schindler (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226561#comment-13226561 ] 

Uwe Schindler commented on LUCENE-3859:
---------------------------------------

Hi Robert,
thanks for opening this. String +1 for any solution.
                
> nuke/clean up AtomicReader.hasNorms
> -----------------------------------
>
>                 Key: LUCENE-3859
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3859
>             Project: Lucene - Java
>          Issue Type: Task
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-3859.patch
>
>
> implementations already have to return fieldInfos() [which can tell you this], and normValues() [which can also tell you this].
> So if we want to keep it, I think it should just have a final implementation and not be required for FilterReaders, etc.
> Or we can just nuke it... do we really need 3 ways to do the same thing?

--
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org