[
https://issues.apache.org/jira/browse/LUCENE-8985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16991927#comment-16991927
]
Michael Sokolov commented on LUCENE-8985:
-----------------------------------------
To my way of thinking this is more of a bug with how we do position queries in
the presence of stop word "holes" rather than something specifically related to
synonyms. For example, wouldn't we expect a phrase query "paris in spring" to
match "paris in the spring"? And, conversely what would the harm be if "Mott
Hoople" matched "Mott the Hoople."
But these are just some anecdotes, perhaps there is a history here of why we
preserve and respect holes that I'm lacking.
Still, given that we cannot index position length, our multi-word synonyms and
other overlapping multi-token runs produce inadvertent phrase queries already,
so trying to be very precise about holes seems like a stretch.
I'm not sure I have an alternate solution to advocate - maybe removing holes
altogether when indexing and querying? Maybe making PhraseQuery somehow treat
holes as nonexistent (that doesn't seem workable though).
And in the end, none of that really militates against this patch; we have
holes, we should handle them consistently, which I guess means that SGF should
preserve them. I think we just need to make sure the implementation is
otherwise sound. It seems as if it a minimum it passes our unit tests. It's
hard to tell by inspection if it has bugs, though. I'd be more confident if we
had some experience with query/document test suite where we can verify that
known good results are not impacted in some way. Do we have any such test bed
though?
> SynonymGraphFilter cannot handle input stream with tokens filtered.
> -------------------------------------------------------------------
>
> Key: LUCENE-8985
> URL: https://issues.apache.org/jira/browse/LUCENE-8985
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Chongchen Chen
> Assignee: Jan Høydahl
> Priority: Major
> Fix For: 8.3
>
> Attachments: SGF_SF_interaction.patch.txt
>
> Time Spent: 2h 40m
> Remaining Estimate: 0h
>
> [~janhoy] find the bug.
> In an analyzer with e.g. stopFilter where tokens are removed from the stream
> and replaced with a “hole”, synonymgraphfilter will not preserve these holes
> but remove them, resulting in certain phrase queries failing.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]