lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-4317) Field.java does not reuse its inlined Keyword-TokenStream
Date Tue, 21 Aug 2012 10:37:38 GMT

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

Robert Muir commented on LUCENE-4317:
-------------------------------------

{quote}
We should maybe think about a solution how to "cache" the instances across several instances
(like IndexWriter did in 3.x). I was thinking about a singleton Analyzer...
{quote}

This is really simple: remove StringField, use KeywordAnalyzer if you want that.

Nobody gets confused with the StringField^H^H^H^NOT_ANALYZED trap anymore (since passing their
same Analyzer used at indexing time to QueryParser nets the same results), there are not two
different "incomplete" declarations of the analysis chain (1. Field, 2. Analyzer) to manage,
instead just Analyzer, and you get reuse/closing/etc.

                
> Field.java does not reuse its inlined Keyword-TokenStream
> ---------------------------------------------------------
>
>                 Key: LUCENE-4317
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4317
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 4.0-BETA
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 5.0, 4.0
>
>         Attachments: LUCENE-4317.patch
>
>
> Field.java contains a inlined Keyword-TokenStream. Unfortunately this one is recreated
all the time, although one reuses the same Field instance. For NumericTokenStream Field.java
reuses it, but the Keyword one not.
> We should apply the same logic and lazy init the TokenStream with a setter for the String
value and reset(). This would be looking identical to SetNumeric(xx).

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


Mime
View raw message