Repository navigation
feat: sync with tantivy-py 0.26.2 - #49
Merged
Merged
Conversation
Update the tantivy-py submodule from 0.24.0-22 to 0.26.2 and port every upstream change back, keeping the file-for-file, method-for-method mapping the port is built on. Bumps tantivy 0.25 -> 0.26.2 and the napi-rs JS toolchain. Ported APIs: - Searcher: orderByField over u64/i64/f64/bool/date/str fast fields, weightByField, cardinality(), fastFieldValues(), termsWithPrefix(); aggregate() now takes and returns objects instead of JSON strings - Query: andMustMatch/orShouldMatch/andMustNotMatch with flat chaining, booleanQuery minimumNumberShouldMatch, moreLikeThisDocumentFieldsQuery, unbounded range bounds, useInvertedIndex, offset pairs for phrase words, existsQuery(fastFieldName, jsonSubpaths) - Index: isCompatible(), registerFastFieldTokenizer(), conjunctionByDefault and allowRegexes on both parse methods, deleteDocuments alias - Module-level parseQuery/parseQueryLenient, addJsonField expandDotsEnabled Fixes found while aligning: - garbageCollectFiles was a silent no-op - makeTerm truncated u64 values through get_uint32 - aggregate coerced its argument to "[object Object]" - dates lost sub-second precision - a negative value for an unsigned field silently became its absolute value - parseQueryLenient returned formatted strings while the 17 error classes it should have returned were exported but unreachable - .husky/pre-commit invoked yarn in a pnpm project, so it always failed Deduplication: one term_from_value instead of two copies of the type match, one more_like_this_builder, get_field instead of four inlined lookups. FieldType variants now use tantivy-py's names (Text, Unsigned, Integer, Float, Boolean, Json). Docs: four new tutorial sections, each backed by an executable example. BREAKING CHANGE: existsQuery drops its schema argument; aggregate takes an object; parseQueryLenient returns error instances rather than strings; phrasePrefixQuery and regexPhraseQuery drop maxExpansions and the two-term minimum; FieldType variants renamed; SearchHit.order widened to number | boolean | string; parser error messages now quote field names with backticks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update the tantivy-py submodule from 0.24.0-22 to 0.26.2 and port every upstream change back, keeping the file-for-file, method-for-method mapping the port is built on. Bumps tantivy 0.25 -> 0.26.2 and the napi-rs JS toolchain.
Ported APIs:
Fixes found while aligning:
Deduplication: one term_from_value instead of two copies of the type match, one more_like_this_builder, get_field instead of four inlined lookups.
FieldType variants now use tantivy-py's names (Text, Unsigned, Integer, Float, Boolean, Json).
Docs: four new tutorial sections, each backed by an executable example.
BREAKING CHANGE: existsQuery drops its schema argument; aggregate takes an object; parseQueryLenient returns error instances rather than strings; phrasePrefixQuery and regexPhraseQuery drop maxExpansions and the two-term minimum; FieldType variants renamed; SearchHit.order widened to number | boolean | string; parser error messages now quote field names with backticks.