You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Grant Ingersoll (JIRA)" <ji...@apache.org> on 2008/01/10 19:49:34 UTC

[jira] Resolved: (LUCENE-210) [PATCH] Never write an Analyzer again

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

Grant Ingersoll resolved LUCENE-210.
------------------------------------

    Resolution: Won't Fix
      Assignee:     (was: Lucene Developers)

> [PATCH] Never write an Analyzer again
> -------------------------------------
>
>                 Key: LUCENE-210
>                 URL: https://issues.apache.org/jira/browse/LUCENE-210
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Analysis
>    Affects Versions: CVS Nightly - Specify date in submission
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Grant Ingersoll
>            Priority: Minor
>         Attachments: analysis.zip, analyzer.patch, analyzer.tar.gz
>
>
> Hi All,
> I got sick of writing Analyzers, so I have re-worked some of the Analyzer and Filter code by making the 
> TokenStream an interface (and Tokenizer and TokenFilter).  I then created a BaseAnalyzer class that you 
> set a tokenizer on and you set a list of TokenFilters.  The tokenStream() method then applies the 
> tokenizer and then loops over the list of TokenFilters, applying each one in order and returning the last 
> one, just as I am sure you have done many a time before.  One requirement for this to work is that the 
> Filters and Tokenizers must allow any state information to be re-initialized through the init() method 
> on TokenStream.  
> Also created AbstractTokenizer and AbstractTokenFilter which are trivial implementations of Tokenizer 
> and TokenFilter respectively.  I have made all existing tokenizers and filters backwards compatible.
> Let me know if you like or dislike and what changes you would like me to make.  I ran all regression 
> tests and they all worked.  I also wrote a TestBaseAnalyzer to test my new Analyzer.  See the Test for 
> usage of the Analyzer.  I haven't done a full scale indexing test on it yet, but will soon.

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