Is there a way to specify that overlapping tokens should not count in a span_near query ?
As in, after using a PatternCaptureGroupFilter I end up with several tokens that overlap and occupy the same token position. But I don't want these tokens to be found when I issue a span_near query with a slop of 0.
I need the equivalent of minimum slop- something greater than -1, say.
Is there a way to do this ?
To be clear I need to distinguish between these two cases:
WORD1/WORD2 WORD3 WORD2
Where WORD1/WORD2 are at token position 0, WORD3 is position 1, and the last WORD2 instance is position 2.
I need a way to find WORD1 within one word of WORD2, but not include the WORD2 that overlaps WORD1.