You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (Created) (JIRA)" <ji...@apache.org> on 2012/02/06 22:28:59 UTC

[jira] [Created] (LUCENE-3755) Add examples to javadocs of Analyzer (4.0)/ReusableAnalyzerBase(3.6)

Add examples to javadocs of Analyzer (4.0)/ReusableAnalyzerBase(3.6)
--------------------------------------------------------------------

                 Key: LUCENE-3755
                 URL: https://issues.apache.org/jira/browse/LUCENE-3755
             Project: Lucene - Java
          Issue Type: Task
          Components: general/javadocs
            Reporter: Robert Muir
             Fix For: 3.6, 4.0


This stuff is great, it makes it easy to define analyzers:

{code}
Analyzer analyzer = new Analyzer() {
    @Override
    protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
      Tokenizer source = new FooTokenizer(reader);
      TokenStream filter = new FooFilter(source);
      filter = new BarFilter(filter);
      return new TokenStreamComponents(source, filter);
    }
  };
{code}

But, we should add basic examples to the javadocs I think (we can backport to ReusableAnalyzerBase).
Also it would be nice to throw in an example that adds a CharFilter.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (LUCENE-3755) Add examples to javadocs of Analyzer (4.0)/ReusableAnalyzerBase(3.6)

Posted by "Uwe Schindler (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13201660#comment-13201660 ] 

Uwe Schindler commented on LUCENE-3755:
---------------------------------------

+1

I also need to change package javadocs about the Reader refactoring... I still see IndexReader.open() in official Javadocs...
                
> Add examples to javadocs of Analyzer (4.0)/ReusableAnalyzerBase(3.6)
> --------------------------------------------------------------------
>
>                 Key: LUCENE-3755
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3755
>             Project: Lucene - Java
>          Issue Type: Task
>          Components: general/javadocs
>            Reporter: Robert Muir
>              Labels: newdev
>             Fix For: 3.6, 4.0
>
>
> This stuff is great, it makes it easy to define analyzers:
> {code}
> Analyzer analyzer = new Analyzer() {
>     @Override
>     protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
>       Tokenizer source = new FooTokenizer(reader);
>       TokenStream filter = new FooFilter(source);
>       filter = new BarFilter(filter);
>       return new TokenStreamComponents(source, filter);
>     }
>   };
> {code}
> But, we should add basic examples to the javadocs I think (we can backport to ReusableAnalyzerBase).
> Also it would be nice to throw in an example that adds a CharFilter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (LUCENE-3755) Add examples to javadocs of Analyzer (4.0)/ReusableAnalyzerBase(3.6)

Posted by "Steven Rowe (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13201669#comment-13201669 ] 

Steven Rowe commented on LUCENE-3755:
-------------------------------------

bq. I did notice this in the javadocs there: {{Analyzer myAnalyzer = new StandardAnalyzer() {}} No way that can work 

Right, I missed that one.

bq. So I think a good balance could be to add a simple basic example to Analyzer.java/ReusableAnalyzerBase.java's class javadocs, but refer/link? to the package-level javadocs for additional use-cases like using charfilters or implementing your own filters.

+1

                
> Add examples to javadocs of Analyzer (4.0)/ReusableAnalyzerBase(3.6)
> --------------------------------------------------------------------
>
>                 Key: LUCENE-3755
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3755
>             Project: Lucene - Java
>          Issue Type: Task
>          Components: general/javadocs
>            Reporter: Robert Muir
>              Labels: newdev
>             Fix For: 3.6, 4.0
>
>
> This stuff is great, it makes it easy to define analyzers:
> {code}
> Analyzer analyzer = new Analyzer() {
>     @Override
>     protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
>       Tokenizer source = new FooTokenizer(reader);
>       TokenStream filter = new FooFilter(source);
>       filter = new BarFilter(filter);
>       return new TokenStreamComponents(source, filter);
>     }
>   };
> {code}
> But, we should add basic examples to the javadocs I think (we can backport to ReusableAnalyzerBase).
> Also it would be nice to throw in an example that adds a CharFilter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (LUCENE-3755) Add examples to javadocs of Analyzer (4.0)/ReusableAnalyzerBase(3.6)

Posted by "Robert Muir (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13201630#comment-13201630 ] 

Robert Muir commented on LUCENE-3755:
-------------------------------------

OK, LUCENE-3666 did look to do some nice cleanup (sorry i think the package-level javadocs are often forgotten).

I did notice this in the javadocs there:
{code}
Analyzer myAnalyzer = new StandardAnalyzer() {
{code}

No way that can work :)

But, any silly nitpicking aside, I think the package-level javadocs are very nice at introducing the analysis package.
Yet we could imagine there are two levels of expertise here:
# making your own analyzer from lucene's existing components (there are so many after all)
# understanding the entire analysis api enough to implement your own components

So I think a good balance could be to add a simple basic example to Analyzer.java/ReusableAnalyzerBase.java's class javadocs,
but refer/link? to the package-level javadocs for additional use-cases like using charfilters or implementing your own filters.



                
> Add examples to javadocs of Analyzer (4.0)/ReusableAnalyzerBase(3.6)
> --------------------------------------------------------------------
>
>                 Key: LUCENE-3755
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3755
>             Project: Lucene - Java
>          Issue Type: Task
>          Components: general/javadocs
>            Reporter: Robert Muir
>              Labels: newdev
>             Fix For: 3.6, 4.0
>
>
> This stuff is great, it makes it easy to define analyzers:
> {code}
> Analyzer analyzer = new Analyzer() {
>     @Override
>     protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
>       Tokenizer source = new FooTokenizer(reader);
>       TokenStream filter = new FooFilter(source);
>       filter = new BarFilter(filter);
>       return new TokenStreamComponents(source, filter);
>     }
>   };
> {code}
> But, we should add basic examples to the javadocs I think (we can backport to ReusableAnalyzerBase).
> Also it would be nice to throw in an example that adds a CharFilter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Updated] (LUCENE-3755) Add examples to javadocs of Analyzer (4.0)/ReusableAnalyzerBase(3.6)

Posted by "Robert Muir (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-3755:
--------------------------------

    Fix Version/s:     (was: 3.6)
    
> Add examples to javadocs of Analyzer (4.0)/ReusableAnalyzerBase(3.6)
> --------------------------------------------------------------------
>
>                 Key: LUCENE-3755
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3755
>             Project: Lucene - Java
>          Issue Type: Task
>          Components: general/javadocs
>            Reporter: Robert Muir
>              Labels: newdev
>             Fix For: 4.0
>
>
> This stuff is great, it makes it easy to define analyzers:
> {code}
> Analyzer analyzer = new Analyzer() {
>     @Override
>     protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
>       Tokenizer source = new FooTokenizer(reader);
>       TokenStream filter = new FooFilter(source);
>       filter = new BarFilter(filter);
>       return new TokenStreamComponents(source, filter);
>     }
>   };
> {code}
> But, we should add basic examples to the javadocs I think (we can backport to ReusableAnalyzerBase).
> Also it would be nice to throw in an example that adds a CharFilter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (LUCENE-3755) Add examples to javadocs of Analyzer (4.0)/ReusableAnalyzerBase(3.6)

Posted by "Steven Rowe (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13201623#comment-13201623 ] 

Steven Rowe commented on LUCENE-3755:
-------------------------------------

bq. we should add basic examples to the javadocs I think (we can backport to ReusableAnalyzerBase).

Not sure if it qualifies as "the javadocs" (did you mean the Analyzer class javadocs?), but in LUCENE-3666, with Uwe's help, I updated the o.a.l.analysis package javadocs to include some examples of this, in both trunk and branch_3x.

bq. Also it would be nice to throw in an example that adds a CharFilter.

I agree - I came across {{Analyzer#initReader()}} after I committed LUCENE-3666, but then forgot to go back and add info about it.
                
> Add examples to javadocs of Analyzer (4.0)/ReusableAnalyzerBase(3.6)
> --------------------------------------------------------------------
>
>                 Key: LUCENE-3755
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3755
>             Project: Lucene - Java
>          Issue Type: Task
>          Components: general/javadocs
>            Reporter: Robert Muir
>              Labels: newdev
>             Fix For: 3.6, 4.0
>
>
> This stuff is great, it makes it easy to define analyzers:
> {code}
> Analyzer analyzer = new Analyzer() {
>     @Override
>     protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
>       Tokenizer source = new FooTokenizer(reader);
>       TokenStream filter = new FooFilter(source);
>       filter = new BarFilter(filter);
>       return new TokenStreamComponents(source, filter);
>     }
>   };
> {code}
> But, we should add basic examples to the javadocs I think (we can backport to ReusableAnalyzerBase).
> Also it would be nice to throw in an example that adds a CharFilter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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