Harmonize handling of underscore in query parser
Needs ReviewPublic

Authored by bruns on Sun, Nov 25, 9:38 PM.

Details

Reviewers
ngraham
poboiko
Group Reviewers
Baloo
Frameworks
Summary

The engine differentiates between independent terms, and adjacent terms
forming a phrase. The latter is e.g. used for mail addresses and file
names, "ice@fire.com" or "foo_bar.png". In the database these are stored
without any punctuation characters, but with their relative positions.

While most punctuation characters (e.g. ".", ",", "/", "-", ...) are
treated the same, underscore was handled differently. A query for
"foo-bar.png" searches for the three adjacent terms, while "foo_bar png"
searches for the three terms in any order.

Treat "_" like any other punctuation character. For this to work, the
delimiter has to be checked from the original input string, not the
text mangled for QTextBoundaryFinder.

Test Plan

ctest

Diff Detail

Repository
R293 Baloo
Branch
submit
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 5371
Build 5389: arc lint + arc unit
bruns created this revision.Sun, Nov 25, 9:38 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptSun, Nov 25, 9:38 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Sun, Nov 25, 9:38 PM