<table><tr><td style="">bruns created this revision.<br />bruns added reviewers: Baloo, ngraham.<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/D28932">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Filename terms where stored twice, once with the "F" filename property<br />
prefix, and once without prefix. This allows to trivially search for<br />
files where a term matches in filename or content, but has a number<br />
of drawbacks:</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">It is not possible to search for a term in content only</li>
<li class="remarkup-list-item">The storage size for filenames is approximately doubled</li>
<li class="remarkup-list-item">File renaming can cause significant I/O load</li>
<li class="remarkup-list-item">Terms appearing in both content and filename may be stored incomplete in the phrase storage.</li>
</ol>

<p>Re (2.), in case full text indexing is disabled this is a significant<br />
part of the storage size. With full text indexing, the space savings<br />
are likely neglegible.</p>

<p>Re (3.), when renaming a file where part of the filename is a common term,<br />
e.g. "The fox.txt", renaming caused rewriting of data for "the", "fox"<br />
and "txt". While for "txt" and "fox" this is neglegible, "the" is common<br />
enough to cause a of rewrite of 10% of the whole DB.</p>

<p>The default search behaviour of matching both filename and content<br />
can be restored by internally creating queries for both filename and<br />
content and ORing both together. This extra step does not have any<br />
noticeable (or even measurable) performance impact.</p>

<p>Depends on <a href="https://phabricator.kde.org/D28929" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D28929</a></p></div></div><br /><div><strong>TEST PLAN</strong><div><p>$> ctest -R querytest<br />
$> baloosearch content:pdf<br />
$> baloosearch filename:pdf<br />
$> baloosearch pdf<br />
$> baloosearch content:pdf OR filename:pdf<br />
(the last two queries are equivalent)</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R293 Baloo</div></div></div><br /><div><strong>BRANCH</strong><div><div>submit</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D28932">https://phabricator.kde.org/D28932</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/integration/querytest.cpp<br />
src/engine/termgenerator.cpp<br />
src/engine/termgenerator.h<br />
src/file/basicindexingjob.cpp<br />
src/lib/searchstore.cpp</div></div></div><br /><div><strong>To: </strong>bruns, Baloo, ngraham<br /><strong>Cc: </strong>kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams<br /></div>