[
https://issues.apache.org/jira/browse/LUCENE-5634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13987844#comment-13987844
]
Robert Muir commented on LUCENE-5634:
-------------------------------------
I would prefer to simply break the interface rather than do anything
sophisticated here. Its a very expert low-level one. The patch had very minimal
impact to the codebase.
I think its good to defer stuff with Analyzer and not do that here, that has a
lot of consumers like QueryParsers, MoreLikeThis, Suggesters, ... Thats a more
complex issue. I am unsure that adding things like equals is a good idea, it
might make things very complex. For now, if you implement your own subclass,
you can just ignore the parameter, and its the same performance and so on.
I will upload a new patch with tests (including doing stupid things).
> Reuse TokenStream instances in Field
> ------------------------------------
>
> Key: LUCENE-5634
> URL: https://issues.apache.org/jira/browse/LUCENE-5634
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Michael McCandless
> Fix For: 4.9, 5.0
>
> Attachments: LUCENE-5634.patch, LUCENE-5634.patch, LUCENE-5634.patch
>
>
> If you don't reuse your Doc/Field instances (which is very expert: I
> suspect few apps do) then there's a lot of garbage created to index each
> StringField because we make a new StringTokenStream or
> NumericTokenStream (and their Attributes).
> We should be able to re-use these instances via a static
> ThreadLocal...
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]