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 (JIRA)" <ji...@apache.org> on 2011/07/12 20:56:00 UTC

[jira] [Created] (LUCENE-3307) don't require an analyzer, if all fields are NOT_ANALYZED

don't require an analyzer, if all fields are NOT_ANALYZED
---------------------------------------------------------

                 Key: LUCENE-3307
                 URL: https://issues.apache.org/jira/browse/LUCENE-3307
             Project: Lucene - Java
          Issue Type: Improvement
            Reporter: Robert Muir


This seems wierd, if you analyze only NOT_ANALYZED fields, you must have an analyzer (null will not work)
because documentsinverter wants it for things like offsetGap

--
This message is automatically generated by JIRA.
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-3307) don't require an analyzer, if all fields are NOT_ANALYZED

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

Robert Muir commented on LUCENE-3307:
-------------------------------------

Shai you want to take this? I am working on something else at the moment!

> don't require an analyzer, if all fields are NOT_ANALYZED
> ---------------------------------------------------------
>
>                 Key: LUCENE-3307
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3307
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Robert Muir
>         Attachments: LUCENE-3307.patch
>
>
> This seems wierd, if you analyze only NOT_ANALYZED fields, you must have an analyzer (null will not work)
> because documentsinverter wants it for things like offsetGap

--
This message is automatically generated by JIRA.
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-3307) don't require an analyzer, if all fields are NOT_ANALYZED

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

Shai Erera commented on LUCENE-3307:
------------------------------------

Yes, I'll commit this. Thanks !

> don't require an analyzer, if all fields are NOT_ANALYZED
> ---------------------------------------------------------
>
>                 Key: LUCENE-3307
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3307
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Robert Muir
>         Attachments: LUCENE-3307.patch
>
>
> This seems wierd, if you analyze only NOT_ANALYZED fields, you must have an analyzer (null will not work)
> because documentsinverter wants it for things like offsetGap

--
This message is automatically generated by JIRA.
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-3307) don't require an analyzer, if all fields are NOT_ANALYZED

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

Shai Erera resolved LUCENE-3307.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0
                   3.4
    Lucene Fields: [New, Patch Available]  (was: [New])

Committed revision 1147530 (trunk).
Committed revision 1147532 (3x).

I did not include a CHANGES entry, because we don't want to advertise null as a supported value for IW.

Thanks Robert !

> don't require an analyzer, if all fields are NOT_ANALYZED
> ---------------------------------------------------------
>
>                 Key: LUCENE-3307
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3307
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Robert Muir
>            Assignee: Shai Erera
>             Fix For: 3.4, 4.0
>
>         Attachments: LUCENE-3307.patch
>
>
> This seems wierd, if you analyze only NOT_ANALYZED fields, you must have an analyzer (null will not work)
> because documentsinverter wants it for things like offsetGap

--
This message is automatically generated by JIRA.
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-3307) don't require an analyzer, if all fields are NOT_ANALYZED

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

Robert Muir commented on LUCENE-3307:
-------------------------------------

{quote}
Robert, perhaps we should add an explicit test, in core, which ensures we can pass a null Analyzer to IWC when we index only NOT_ANALYZED and NumericFields?
{quote}

I don't like the idea of any kind of test or documentation that says we explicitly support null.
Then, suddenly null is an officially supported value for Analyzer and people start wanting it in other places.

If we must have a test here to proceed, I would instead prefer to cancel as Won't fix.


> don't require an analyzer, if all fields are NOT_ANALYZED
> ---------------------------------------------------------
>
>                 Key: LUCENE-3307
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3307
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Robert Muir
>         Attachments: LUCENE-3307.patch
>
>
> This seems wierd, if you analyze only NOT_ANALYZED fields, you must have an analyzer (null will not work)
> because documentsinverter wants it for things like offsetGap

--
This message is automatically generated by JIRA.
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] [Assigned] (LUCENE-3307) don't require an analyzer, if all fields are NOT_ANALYZED

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

Shai Erera reassigned LUCENE-3307:
----------------------------------

    Assignee: Shai Erera

> don't require an analyzer, if all fields are NOT_ANALYZED
> ---------------------------------------------------------
>
>                 Key: LUCENE-3307
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3307
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Robert Muir
>            Assignee: Shai Erera
>         Attachments: LUCENE-3307.patch
>
>
> This seems wierd, if you analyze only NOT_ANALYZED fields, you must have an analyzer (null will not work)
> because documentsinverter wants it for things like offsetGap

--
This message is automatically generated by JIRA.
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-3307) don't require an analyzer, if all fields are NOT_ANALYZED

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

Michael McCandless commented on LUCENE-3307:
--------------------------------------------

Also, remember we are wanting to fully decouple indexing from analysis (LUCENE-2309) at which point IndexWriter(Config) will no longer even see an Analyzer; the use of an Analyzer (or any other app-specific pipeline/capability/etc.) will be hidden to IW under the IndexableField API.  At that point this "problem" of having to pass some random Analyzer or null should go away, because you should then only be required to pass an Analyzer to FieldTypes that do analyze their field text.

> don't require an analyzer, if all fields are NOT_ANALYZED
> ---------------------------------------------------------
>
>                 Key: LUCENE-3307
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3307
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Robert Muir
>         Attachments: LUCENE-3307.patch
>
>
> This seems wierd, if you analyze only NOT_ANALYZED fields, you must have an analyzer (null will not work)
> because documentsinverter wants it for things like offsetGap

--
This message is automatically generated by JIRA.
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-3307) don't require an analyzer, if all fields are NOT_ANALYZED

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

Robert Muir updated LUCENE-3307:
--------------------------------

    Attachment: LUCENE-3307.patch

> don't require an analyzer, if all fields are NOT_ANALYZED
> ---------------------------------------------------------
>
>                 Key: LUCENE-3307
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3307
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Robert Muir
>         Attachments: LUCENE-3307.patch
>
>
> This seems wierd, if you analyze only NOT_ANALYZED fields, you must have an analyzer (null will not work)
> because documentsinverter wants it for things like offsetGap

--
This message is automatically generated by JIRA.
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-3307) don't require an analyzer, if all fields are NOT_ANALYZED

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

Shai Erera commented on LUCENE-3307:
------------------------------------

+1 !

This is also weird if you index only NumericFields. You need to pass whatever random analyzer that crosses your mind at the moment, just so that it's used to get the offset gap and posIncr.

Robert, perhaps we should add an explicit test, in core, which ensures we can pass a null Analyzer to IWC when we index only NOT_ANALYZED and NumericFields?

> don't require an analyzer, if all fields are NOT_ANALYZED
> ---------------------------------------------------------
>
>                 Key: LUCENE-3307
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3307
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Robert Muir
>         Attachments: LUCENE-3307.patch
>
>
> This seems wierd, if you analyze only NOT_ANALYZED fields, you must have an analyzer (null will not work)
> because documentsinverter wants it for things like offsetGap

--
This message is automatically generated by JIRA.
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-3307) don't require an analyzer, if all fields are NOT_ANALYZED

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

Uwe Schindler commented on LUCENE-3307:
---------------------------------------

+1

> don't require an analyzer, if all fields are NOT_ANALYZED
> ---------------------------------------------------------
>
>                 Key: LUCENE-3307
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3307
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Robert Muir
>         Attachments: LUCENE-3307.patch
>
>
> This seems wierd, if you analyze only NOT_ANALYZED fields, you must have an analyzer (null will not work)
> because documentsinverter wants it for things like offsetGap

--
This message is automatically generated by JIRA.
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-3307) don't require an analyzer, if all fields are NOT_ANALYZED

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

Shai Erera commented on LUCENE-3307:
------------------------------------

Ok I agree. +1 to commit.

> don't require an analyzer, if all fields are NOT_ANALYZED
> ---------------------------------------------------------
>
>                 Key: LUCENE-3307
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3307
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Robert Muir
>         Attachments: LUCENE-3307.patch
>
>
> This seems wierd, if you analyze only NOT_ANALYZED fields, you must have an analyzer (null will not work)
> because documentsinverter wants it for things like offsetGap

--
This message is automatically generated by JIRA.
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-3307) don't require an analyzer, if all fields are NOT_ANALYZED

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

Robert Muir commented on LUCENE-3307:
-------------------------------------

{quote}
At that point this "problem" of having to pass some random Analyzer or null should go away, because you should then only be required to pass an Analyzer to FieldTypes that do analyze their field text.
{quote}

Right, and the last thing i want to see is some sophisticated backwards layer / crappy hacks because we enabled null on this issue!

Basically, I think we should make it work right now, but undocumented and unspecified. If you pass Analyzer=null to IW you need to be prepared for NPE.


> don't require an analyzer, if all fields are NOT_ANALYZED
> ---------------------------------------------------------
>
>                 Key: LUCENE-3307
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3307
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Robert Muir
>         Attachments: LUCENE-3307.patch
>
>
> This seems wierd, if you analyze only NOT_ANALYZED fields, you must have an analyzer (null will not work)
> because documentsinverter wants it for things like offsetGap

--
This message is automatically generated by JIRA.
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