Solr highlight : InvalidTokenOffsetsException
I use solr 3.4. When I search a word, I have an InvalidTokenOffsetsException. My field type look like :
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.ASCIIFoldingFilterFactory"/>
<filter class="solr.EdgeNGramFilterFactory" minGramSize="3" maxGramSize="15" />
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.ASCIIFoldingFilterFactory"/>
<filter class="solr.EdgeNGramFilterFactory" minGramSize="3" maxGramSize="15" />
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
When I remove "ASCIIFoldingFilterFactory", it works. It's the same 开发者_运维问答problem with "ISOLatin1AccentFilterFactory".
Anyone have a solution ?
thanks
I had the same problem, and reported a bug https://issues.apache.org/jira/browse/LUCENE-3642 – its fixed in trunk right now.
I applied the patch manually and compiled solr my self, worked for both Solr 3.4 and Solr 3.5 although the patch did not apply cleanly and I had to do some manual fixing.
精彩评论