Skip to content

[phrase match | strict mode] Allow phrase condition when enabled in index#6749

Merged
coszio merged 2 commits intoadd-phrase-match-variantfrom
phrase-strict-mode
Jun 24, 2025
Merged

[phrase match | strict mode] Allow phrase condition when enabled in index#6749
coszio merged 2 commits intoadd-phrase-match-variantfrom
phrase-strict-mode

Conversation

@coszio
Copy link
Contributor

@coszio coszio commented Jun 23, 2025

Builds on top of #6670

Fixes the check for phrase index, so that strict mode allows phrase conditions when the text index has phrase_matching enabled

@coszio coszio requested review from agourlay and timvisee June 23, 2025 21:48
pprof = { workspace = true }

[dependencies]
bitpacking = "0.9.2"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Additionally, removes bitpacking dep here

Copy link
Member

@generall generall left a comment

Choose a reason for hiding this comment

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

Would it be possible to change error text, so it would indicate that user needs to create text index with phrase flag in order to search with phrases?

Right now it only asks to create text index, while text index is already created

@coszio coszio force-pushed the phrase-strict-mode branch from 134325b to 71e78a5 Compare June 24, 2025 15:22
@coszio coszio force-pushed the add-phrase-match-variant branch from 5366848 to 8e43065 Compare June 24, 2025 15:24
@coszio
Copy link
Contributor Author

coszio commented Jun 24, 2025

@generall in 71e78a5 I have modified the Display impl to account for phrase matching, and parametrized integer index. Although the integer index is still recommended unparametrized

This is the new error:

{
  "error": "Bad request: Index required but not found for \"t\" of one of the following types: [text (with phrase_matching: true)]. Help: Create an index for this key or use a different filter."
}

@coszio coszio requested a review from generall June 24, 2025 15:29
@coszio coszio merged commit 5dc7508 into add-phrase-match-variant Jun 24, 2025
@coszio coszio deleted the phrase-strict-mode branch June 24, 2025 18:32
coszio added a commit that referenced this pull request Jun 24, 2025
* add `"match": { "phrase": ... }` condition

* gen grpc and openapi

* [phrase matching] expose `phrase_matching` flag in rest and grpc (#6620)

* expose setting in rest and grpc

* phrase matching openapi test

* regen openapi

* [phrase matching] Text index fixes (#6730)

* allow rocksdb-based immutable text index

* fix repeated-token phrases

* fmt

* Update OpenAPI spec

---------

Co-authored-by: timvisee <tim@visee.me>

* add repeated word case in openapi test

* [phrase match | strict mode] Allow phrase condition when enabled in index (#6749)

* allow phrase filter when index is present

* prettier error message

* clippppppy

---------

Co-authored-by: timvisee <tim@visee.me>
generall pushed a commit that referenced this pull request Jul 17, 2025
* add `"match": { "phrase": ... }` condition

* gen grpc and openapi

* [phrase matching] expose `phrase_matching` flag in rest and grpc (#6620)

* expose setting in rest and grpc

* phrase matching openapi test

* regen openapi

* [phrase matching] Text index fixes (#6730)

* allow rocksdb-based immutable text index

* fix repeated-token phrases

* fmt

* Update OpenAPI spec

---------

Co-authored-by: timvisee <tim@visee.me>

* add repeated word case in openapi test

* [phrase match | strict mode] Allow phrase condition when enabled in index (#6749)

* allow phrase filter when index is present

* prettier error message

* clippppppy

---------

Co-authored-by: timvisee <tim@visee.me>
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.

3 participants