You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2011/01/27 11:13:44 UTC

[jira] Updated: (LUCENE-2191) rename Tokenizer.reset(Reader) to Tokenizer.setReader(Reader)

     [ https://issues.apache.org/jira/browse/LUCENE-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2191:
----------------------------------

    Fix Version/s: 4.0

I think we should simply do this in trunk (4.0), no backwards problems! reset(Reader) is the wrong name and confuses people (especially if it should include reset() or not - correct is that it should *not* also call reset() - I fixed lots of Tokenizers like StandardTokenizer to conform to this)

> rename Tokenizer.reset(Reader) to Tokenizer.setReader(Reader)
> -------------------------------------------------------------
>
>                 Key: LUCENE-2191
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2191
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: contrib/analyzers
>            Reporter: Robert Muir
>            Priority: Minor
>             Fix For: 4.0
>
>
> in TokenStream there is a reset() method, but the method in Tokenizer used to set a new Reader is called reset(Reader).
> in my opinion this name overloading creates a lot of confusion, and we see things like reset(Reader) calling reset() even in StandardTokenizer...
> So I think this would be some work to fulfill all the backwards compatibility, but worth it because when you look at the existing reset(Reader) and reset() code in various tokenizers, or the javadocs for Tokenizer, its pretty confusing and inconsistent.

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org