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

Why do sloppy phrase queries return such different hit counts? #12

Open
mikemccand opened this issue May 9, 2023 · 2 comments
Open

Comments

@mikemccand
Copy link
Collaborator

The two engines sometimes produce wildly different results -- how come?

E.g.:

"web url"~4   428 docs (Tantivy)   131,414 docs  (Lucene)
@PSeitz
Copy link

PSeitz commented May 12, 2023

The phrase query handling with slop in tantivy 0.19 doesn't allow reordering of the terms, e.g. "A B"~2 matching "B A". This will be allowed with tantivy 0.20 and should match the behavior of lucene (quickwit-oss/tantivy#2020)

@mikemccand
Copy link
Collaborator Author

Aha, transpositions! Lucene's FuzzyQuery went through a similar evolution :)

Thanks @PSeitz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants