Skip to content

Conversation

@daddaman-amz
Copy link
Collaborator

@daddaman-amz daddaman-amz commented Nov 26, 2025

After rebases with major PR's

Changes for pre-filter evaluator for Text.
There is a config to turn off the evaluation for Non vector (by default it is on).

Reason for config:
We wanted to see the performance difference for disabling pre-filter evaluation (i.e it passes through keys with only deduplication but no evaluation) vs enabling it

@daddaman-amz daddaman-amz marked this pull request as ready for review December 2, 2025 02:44
@daddaman-amz daddaman-amz added the FT Pertains to the Full-Text project label Dec 2, 2025
class TestFullText(ValkeySearchTestCaseDebugMode):

def test_text_search(self):
@pytest.mark.parametrize("prefilter_eval_enabled", [pytest.param(False, id="Prefilter_eval=False"), pytest.param(True, id="Prefilter_eval=True")])
Copy link
Member

Choose a reason for hiding this comment

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

You could just store "yes" / "no" as param values and then we can execute config set commands without any IF statement. It will keep the tests less verbose

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ack will do this in followup as discussed


// Access target key for proximity validation (only for Text)
virtual const InternedStringPtr& GetTargetKey() const = 0;
virtual bool IsPrefilterEvaluator() const { return false; }
Copy link
Member

@KarthikSubbarao KarthikSubbarao Dec 10, 2025

Choose a reason for hiding this comment

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

A more generic API would be GetEvaluatorType and this can return either Prefilter or Predicate. This can be an enum return type

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ack will do this in followup as discussed

.filter = "\\\\\\\\\\(Hello, \\$how \\\\\\*are \\\\\\-you "
"\\\\\\\\\\%doing?",
.create_success = true,
.evaluate_success = true,
Copy link
Member

Choose a reason for hiding this comment

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

I would like to have this evaluation check added back in all the test cases that have them removed currently.

We could actually have more test cases that validate the positional check logic in the prefilter evaluator.

I understand that our text ingestion is missing escaped char handling. This is planned to be addressed soon, so we should get back on coverage on it here.

Can we do this in a follow up?

  1. Add more test cases that validate positional checks / prefilter logic checks
  2. Add escaped char handling after our ingestion is updated. (If we want to search for a term starting with a backslash).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ack will do this in followup

Copy link
Member

@KarthikSubbarao KarthikSubbarao left a comment

Choose a reason for hiding this comment

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

Discussed with @daddaman-amz that these comments which are non blocking and more about maintainability & additional coverage will be addressed in a follow up

@KarthikSubbarao KarthikSubbarao merged commit d765bf4 into valkey-io:fulltext Dec 10, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FT Pertains to the Full-Text project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants