Skip to content

Upgrade tantivy 0.24. Fixes #470 #472

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

Merged
merged 5 commits into from
Apr 29, 2025
Merged

Conversation

cjrh
Copy link
Collaborator

@cjrh cjrh commented Apr 15, 2025

Still a couple failing tests to work through.

@cjrh cjrh mentioned this pull request Apr 15, 2025
@cjrh cjrh requested review from wallies and Sidhant29 April 20, 2025 14:55
@cjrh
Copy link
Collaborator Author

cjrh commented Apr 20, 2025

Ok tests are passing. I want to go over the changes again to check for efficiency.

@wallies wallies requested a review from Copilot April 22, 2025 10:35
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request upgrades the tantivy dependency to version 0.24.0 and updates test expectations and error messages to match the new API behavior. Key changes include:

  • Modifications to test cases to account for new query representations and error messages.
  • Updates in snippet and query modules to use revised module paths and API calls.
  • Adjustments in document handling to switch from using BTreeMap to a Vec of key/value pairs.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_escapes.py Updated test behavior to expect no error with escape characters.
tests/tantivy_test.py Modified expected query representations and error messages.
src/snippet.rs Updated module paths for snippet generator usage.
src/query.rs Revised range query API to conform to updated tantivy usage.
src/document.rs Changed JSON conversion from a BTreeMap to a Vec of tuples.
Cargo.toml Upgraded tantivy dependency to version 0.24.0.

# from tantivy versions prior to 0.24.0 in which the following would
# raise a `ValueError`.
q = index.parse_query(r'sea\"', ["title", "body"])
print(q)
Copy link
Preview

Copilot AI Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The print statement appears to be a leftover debug output. It is recommended to remove it unless it serves a specific purpose in the test.

Suggested change
print(q)

Copilot uses AI. Check for mistakes.

@wallies
Copy link
Collaborator

wallies commented Apr 22, 2025

Really good to get #401 in somehow after this

@cjrh cjrh mentioned this pull request Apr 29, 2025
@cjrh cjrh merged commit 62af662 into quickwit-oss:master Apr 29, 2025
10 checks passed
@cjrh cjrh deleted the upgrade-tantivy-0.24 branch May 3, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants