You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Nick Pellow (JIRA)" <ji...@apache.org> on 2010/12/06 02:02:12 UTC
[jira] Commented: (LUCENE-2235) implement
PerFieldAnalyzerWrapper.getOffsetGap
[ https://issues.apache.org/jira/browse/LUCENE-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12967057#action_12967057 ]
Nick Pellow commented on LUCENE-2235:
-------------------------------------
I just upgraded to 3.0.3 and we started getting NullPointerExceptions coming from PerFieldAnalyzerWrapper.
We have a PerFieldAnalyzerWrapper that has a null defaultAnalyzer:
{code}
private final PerFieldAnalyzerWrapper analyzer = new PerFieldAnalyzerWrapper(null);
{code}
We add analyzers to all fields that are analyzed. ie: field.isAnalyzed() == true.
getOffsetGap on PerFieldAnalyzerWrapper is being called, even for these non-analyzed fields. Is this expected behaviour?
Lines 200-203 of DocInverterPerField are:
{code}
if (anyToken)
fieldState.offset += docState.analyzer.getOffsetGap(field);
fieldState.boost *= field.getBoost();
}
{code}
Should this be checking that a field is indeed analyzed before calling getOffsetGap ?
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org