Hi Chris, > Because if you can adjust your parser syntax, this literallyly just > becomes: ' field:"foo bar"~N ' ... where N is the positionIncrementGap > on your analyzer ... OR ... ' field:"foo bar" ' ... if you call > setPhraseSlop on your QueryParser.
Yes - correct. This would be equivalent what others suggested with intervals (search for a fixed-length phrase and filter out false positives by leveraging position increments between values). I think the second solution is somewhat more flexible - index a sentinel token between values and ensure it's not part of the hit range. This allows you to use any type of interval query underneath, which is nice. > So maybe the "solution" (at least for the flexible parser ... IIUC, I > haven't used it much) would be for BooleanQueryNode to carry some metadata > [...] I haven't reached the phase of modifying the flexible query parser for my use case but it's definitely going to work something like you suggest. I think I'm going to rewrite the node tree from the syntax parser into interval queries though (either in full or in part). I'll see what can be done there. Dawid --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org