Skip to content

Conversation

@dluc
Copy link
Collaborator

@dluc dluc commented Dec 2, 2025

Summary

The known issue "Quoted Phrases Don't Escape Operators" was already fixed in a previous commit. This PR adds regression tests and documents the resolution.

Changes

  • tests/Core.Tests/Search/SearchEndToEndTests.cs: Added 7 E2E regression tests:

    • KnownIssue2_QuotedPhraseWithAND_FindsExactPhrase
    • KnownIssue2_QuotedPhraseWithOR_FindsExactPhrase
    • KnownIssue2_QuotedPhraseWithNOT_FindsExactPhrase
    • KnownIssue2_QuotedReservedWordAND_FindsDocumentsContainingAND
    • KnownIssue2_QuotedReservedWordOR_FindsDocumentsContainingOR
    • KnownIssue2_QuotedReservedWordNOT_FindsDocumentsContainingNOT
    • KnownIssue2_MixedQuotedPhraseAndOperator_WorksCorrectly
  • KNOWN-ISSUES.md: Moved issue to "Resolved Issues" section

  • tests/Main.Tests/Integration/ExamplesCommandE2ETests.cs: Updated comments

How it works

The tokenizer in InfixQueryParser.cs correctly identifies quoted strings and preserves their content as literal text. The FTS query extractor properly quotes phrases and escapes reserved words when generating FTS5 queries.

Test plan

  • All 537 tests pass (323 Core + 214 Main)
  • Zero skipped tests
  • Code coverage at 83.93% (above 80% threshold)
  • build.sh passes with 0 warnings
  • format.sh passes
  • coverage.sh passes

The known issue "Quoted Phrases Don't Escape Operators" was already fixed
in a previous commit. This PR adds 7 regression tests to prevent future
regressions and documents the fix in KNOWN-ISSUES.md.

Tests verify that quoted phrases like "Alice AND Bob" correctly search
for the literal text instead of treating AND/OR/NOT as operators.
@dluc dluc force-pushed the fix-quoted-phrases-operators branch from 87fe1a6 to c583d76 Compare December 2, 2025 12:25
@dluc dluc merged commit b596a17 into main Dec 2, 2025
7 checks passed
@dluc dluc deleted the fix-quoted-phrases-operators branch December 2, 2025 12:26
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