Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong count for some queries using the near operator ^ #566

Closed
thomaskrause opened this issue Oct 9, 2017 · 0 comments · Fixed by #567
Closed

Wrong count for some queries using the near operator ^ #566

thomaskrause opened this issue Oct 9, 2017 · 0 comments · Fixed by #567
Assignees
Labels

Comments

@thomaskrause
Copy link
Member

thomaskrause commented Oct 9, 2017

The near operator ^ should be symmetrically but is not for some combination of queries and corpora. E.g.
pos = "VAFIN" ^ pos = /VV.*/
should have the same result as
pos = /VV.*/ ^ pos = "VAFIN"

The reason is a wrong generated SQL condition

(facts1.right_token = facts2.left_token - 1 OR facts2.left_token = facts1.right_token - 1)

which should be replaced by

(facts1.right_token = facts2.left_token - 1 OR facts2.right_token = facts1.left_token - 1)
@thomaskrause thomaskrause added this to the 3.5.0 milestone Oct 9, 2017
@thomaskrause thomaskrause self-assigned this Oct 9, 2017
@thomaskrause thomaskrause modified the milestones: 3.5.0, 3.5.0-preview5 Oct 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant