[
https://issues.apache.org/jira/browse/LUCENE-3920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238046#comment-13238046
]
Robert Muir commented on LUCENE-3920:
-------------------------------------
Now I understand the bug. Its not related to shingles (its just that shingles
is a word-combiner).
just running the test on LUCENE-3919, I've tripped this with some other
combinations,
like NGramTokenizer + HyphenatedWordsFilter, if the text ends with a hyphen:
{noformat}
[junit] TEST FAIL: useCharFilter=true text='wonxkil ?-?-'
[junit] Exception from random analyzer: tokenizer=class
org.apache.lucene.analysis.ngram.NGramTokenizer
[junit] filters=class
org.apache.lucene.analysis.miscellaneous.HyphenatedWordsFilter,class
org.apache.lucene.analysis.ga.IrishLowerCaseFilter,class
org.apache.lucene.analysis.hi.HindiStemFilter
{noformat}
The problem is as Mike mentions on LUCENE-3907, the n-grams perform "multiple
passes".
So imagine the text is 'abcd', if you ngram(1,2), they emit:
a, b, c, d, ab, bc, cd
instead of something like:
a, ab, b, bc, c, cd, d, ...
Because if this, if someone 'joins' the d and ab, they create a term with a
startOffset > endOffset...
> ShingleFilter sometimes confuses offsets
> ----------------------------------------
>
> Key: LUCENE-3920
> URL: https://issues.apache.org/jira/browse/LUCENE-3920
> Project: Lucene - Java
> Issue Type: Bug
> Affects Versions: 3.6, 4.0
> Reporter: Robert Muir
> Attachments: LUCENE-3920_test.patch
>
>
> It seems like maybe its possibly applying the offsets from the wrong token?
> Because after shingling, the resulting token has a startOffset thats after
> the endoffset.
--
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: [email protected]
For additional commands, e-mail: [email protected]