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

Simon Willnauer commented on LUCENE-2169:
-----------------------------------------

Uwe, when I first looked at your patch I thought that is a good idea but once I 
looked at the usecases of CharArraySet differentiating between matchVersion if 
the given set is an instance of CharArraySet is not idea IMO. Imagine you 
create an analyzer with CharArraySet the analyzer will use its own given 
version together with the copy method internally if the analyzer is created 
with a different version than the provided stopset (which is already a 
CharArraySet) copy could change the behavior due to the given version with is 
actually the matchVersion for the analyzer not for the set. I would leave the 
decision to the user if a copy with a different version is what the user wants. 
If the version should not be preserved and the set to copy is a charArraySet 
users should use the constructor directly. I will attach a patch shortly

> Speedup of CharArraySet#copy if a CharArraySet instance is passed to copy.
> --------------------------------------------------------------------------
>
>                 Key: LUCENE-2169
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2169
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Analysis
>    Affects Versions: 3.1
>            Reporter: Simon Willnauer
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2169.patch, LUCENE-2169.patch, LUCENE-2169.patch, 
> LUCENE-2169.patch
>
>
> the copy method should use the entries array itself to copy the set 
> internally instead of iterating over all values. this would speedup copying 
> even small set 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to