Postpone term parsing until needed, do not set both term and searchstring
ClosedPublic

Authored by bruns on Apr 7 2019, 8:41 PM.

Details

Summary

Query::toJSON() adds both the term and searchstring to the json data
if both are set. As setSearchString always initialized the term from
the string, this was typically true.

The executed query contained the conditions twice, and the serialized
document was overspecified.

Test Plan

ctest
dolphin baloosearch, select e.g. "today"
-> modified is only in the searchstring, term is not set

Diff Detail

Repository
R293 Baloo
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.Apr 7 2019, 8:41 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptApr 7 2019, 8:41 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Apr 7 2019, 8:41 PM
ngraham accepted this revision.Apr 7 2019, 8:52 PM
This revision is now accepted and ready to land.Apr 7 2019, 8:52 PM
This revision was automatically updated to reflect the committed changes.