<table><tr><td style="">bruns created this revision.<br />bruns added reviewers: Baloo, ngraham, astippich, poboiko.<br />Herald added projects: Frameworks, Baloo.<br />Herald added a subscriber: kde-frameworks-devel.<br />bruns requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D21865">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The (somewhat arbitrary) term truncation was applied to the UTF-8 encoded<br />
data, somethimes truncating the term in the middle of a codepoint.</p>

<p>Truncate the QString instead. This also has the effect of leaving more<br />
useful characters for languages where the majority of codepoints are<br />
encoded as 2 or more bytes.</p>

<p>This requires some extra storage size in the DB when a term which would<br />
have been truncated previously now goes in as is, but likely only a few<br />
terms / languages are affected (for english words UTF-8 encodes most<br />
codepoints in 1 byte).</p>

<p>There is a small caveat for the SearchStore. As queries were truncated<br />
likewise, an untruncated query would no longer find untruncated terms from<br />
new index runs. To allow matches nevertheless, truncated terms use<br />
StartsWith instead of Equal matches.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>ctest</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R293 Baloo</div></div></div><br /><div><strong>BRANCH</strong><div><div>phrasestorage_fixes</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D21865">https://phabricator.kde.org/D21865</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/engine/termgenerator.cpp<br />
src/lib/searchstore.cpp</div></div></div><br /><div><strong>To: </strong>bruns, Baloo, ngraham, astippich, poboiko<br /><strong>Cc: </strong>kde-frameworks-devel, LeGast00n, fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams<br /></div>