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

Uwe Schindler commented on LUCENE-2235:
---------------------------------------

Hi Nick,
thanks for reporting this. Your problem only occurs since the missing method 
was added (before PFAW only returned some default, now it throws NPE) in that 
case.

In general, Lucene does not support *null* analyzers anywhere (not as ctor 
argument in IW/IWC) or e.g. here. You should always add a "simple" analyzer to 
IndexWriter (WhitespaceAnalyzer, SimpleAnalyzer, KeywordAnalyzer) or other 
methods taking Analyzer.

To really fix this, we have to review all places that don't need to call 
Analyzers. There are e.g. other places, like when you directly pass the 
TokenStream to the Field with "new Field(name, TokenStream), it also calls the 
analyzer, so you have to implement it.

> implement PerFieldAnalyzerWrapper.getOffsetGap
> ----------------------------------------------
>
>                 Key: LUCENE-2235
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2235
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Analysis
>    Affects Versions: 3.0
>         Environment: Any
>            Reporter: Javier Godoy
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 2.9.4, 3.0.3, 3.1, 4.0
>
>         Attachments: LUCENE-2235.patch, PerFieldAnalyzerWrapper.patch
>
>
> PerFieldAnalyzerWrapper does not delegates calls to getOffsetGap(Fieldable), 
> instead it returns the default values from the implementation of Analyzer. 
> (Similar to LUCENE-659 "PerFieldAnalyzerWrapper fails to implement 
> getPositionIncrementGap")

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

Reply via email to