https://bugs.kde.org/show_bug.cgi?id=412421

--- Comment #9 from Stefan Brüns <stefan.bru...@rwth-aachen.de> ---
Git commit af0b611bced29e6cc00f120e9ff69470bd657a7d by Stefan Brüns.
Committed on 13/11/2023 at 21:41.
Pushed by bruns into branch 'kf5'.

[SearchStore] Always use TermGenerator instead of QueryParser

The QueryParser handles two fairly distinct tasks, parsing of quoting
characters, and splitting of phrases into terms.

The Phrase/Term splitting is similar to the TermGenerator, but slightly
different. Using a different implementation for searching and DB storage
can cause matching errors.

While the nested QueryParser quoting /can/ be used, it is fairly
redundant, and problematic:

- Quoting is already handled by the AdvancedQueryParser, which always
  sits in front of the SearchStore.
- The QueryParser is *only* used for "contains" queries (e.g.
  filename:foo.png) not "equal" queries ("filename=foo.png").
- Quoting of phrases for both variants is different,
  content:\"\'a b\'\" vs. content=\"a \"b".
- The QueryParser does not handle term truncation (see bug reference).

Use the TermGenerator in all cases, so term splitting and quoting is
uniform.
(cherry picked from commit b7c8ce1a999225f0362b8be274a9d5c786c3edda)

M  +0    -1    autotests/integration/querytest.cpp
M  +7    -3    src/lib/searchstore.cpp

https://invent.kde.org/frameworks/baloo/-/commit/af0b611bced29e6cc00f120e9ff69470bd657a7d

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to