[ 
https://issues.apache.org/jira/browse/SOLR-1377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12746287#action_12746287
 ] 

Ryan McKinley commented on SOLR-1377:
-------------------------------------

Is reset gaurenteed to be called on the same Reader?  For the Pattern 
implementation, all the tokens are created beforehand and are just passed off 
with iter.next(), so if the input changes, the whole thing would need to change.

+       public void reset(Reader input) throws IOException {
+          super.reset(input);
+          init();
+       }

Any reason not to implement reset on: TrieTokenizerFactory?

> Force TokenizerFactory to create a Tokenizer rather then TokenStream 
> ---------------------------------------------------------------------
>
>                 Key: SOLR-1377
>                 URL: https://issues.apache.org/jira/browse/SOLR-1377
>             Project: Solr
>          Issue Type: New Feature
>          Components: Analysis
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.4
>
>         Attachments: SOLR-1377-Tokenizer.patch, SOLR-1377.patch
>
>
> The new token reuse classes require that they are created with a Tokenizer.  
> The solr TokenizerFactory interface currently makes a TokenStream.
> Although this is an API breaking change, the alternative is to just document 
> that it needs to be a Tokenizer instance and throw an error when it is not.
> For more discussion, see:
> http://www.lucidimagination.com/search/document/272b8c4e6198d887/trunk_classcastexception_with_basetokenizerfactory

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

Reply via email to