You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My understanding of the SpanQuery API is that in the example you provide it will be looking for exact matches of the "applepie" token next to the "bananapie" token. Therefore the separate tokens "apple" and "pie" will not match the first query term "applepie".
Since span queries can be nested you could break each search term "applepie" and "bananapie" into a pair of tokens ("apple", "pie) and create each as a SpanNearQuery, then combine them into another one.
Description
Hello,
I'm contacting you to confirm a discrepancy I've found while using SpanNearQuery.
apple:PositionIncrementAttribute.setPositionIncrement(1)
pie:PositionIncrementAttribute.setPositionIncrement(0)
banana:PositionIncrementAttribute.setPositionIncrement(1)
pie:PositionIncrementAttribute.setPositionIncrement(0)
Then searching with inorder spanNear(apple, pie, banana, pie)
The search stops due to position + 1, resulting in no search results
I'm wondering if there's a special reason for including position + 1. If not, it seems it would be better to remove the "+1" part.
The text was updated successfully, but these errors were encountered: