[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Review Request 128664: Nested tags for Baloo
From:       Vishesh Handa <me () vhanda ! in>
Date:       2016-09-04 9:51:04
Message-ID: 20160904095104.21849.76968 () mimi ! kde ! org
[Download RAW message or body]

--===============5964759505697917154==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128664/#review98860
-----------------------------------------------------------



Please test out all possible workflows. Ideally it would be great if we could have \
automated tests for all the workflows with tags.


src/file/basicindexingjob.cpp (line 95)
<https://git.reviewboard.kde.org/r/128664/#comment66551>

    Please add a test for this -
    
    We have a basicindexingjobtest file where the tests were "temporarily" removed. \
They clearly need to be added again with the behaviour this class expects.



src/file/basicindexingjob.cpp (line 107)
<https://git.reviewboard.kde.org/r/128664/#comment66550>

    Alright. So now TA instead of being a prefix to store each word, it now stores \
the entire tag.  
    This breaks existing behaviour. That's typically frowned upon. Example - All tags \
with more than 1 word.  
    Perhaps it would just be easier if we would intrduce a new prefix.



src/kioslaves/tags/kio_tags.cpp (line 91)
<https://git.reviewboard.kde.org/r/128664/#comment66552>

    So if we only have tag in the form -
    
    "Fire/Water"
    
    at that point unless one also has the tag "Fire", it will just never show up.


- Vishesh Handa


On Aug. 20, 2016, 10:58 p.m., James Smith wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128664/
> -----------------------------------------------------------
> 
> (Updated Aug. 20, 2016, 10:58 p.m.)
> 
> 
> Review request for Baloo and Vishesh Handa.
> 
> 
> Bugs: 334615
> http://bugs.kde.org/show_bug.cgi?id=334615
> 
> 
> Repository: baloo
> 
> 
> Description
> -------
> 
> Index and query each tag as a single full term for generating recursed search \
> results. Represent nested tags as recursed items in the Tags:// KIO Slave. 
> 
> Diffs
> -----
> 
> src/file/basicindexingjob.cpp 88bb59a01e5592abb74b1ab345bfc6765d35db57 
> src/kioslaves/tags/kio_tags.cpp de2e6d71945632e23a85f831878b4c431360731c 
> src/lib/searchstore.cpp 060a4fd795ab858eb84526f93f827d09ee85db7c 
> 
> Diff: https://git.reviewboard.kde.org/r/128664/diff/
> 
> 
> Testing
> -------
> 
> Compile, run
> 
> 
> Thanks,
> 
> James Smith
> 
> 


--===============5964759505697917154==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/128664/">https://git.reviewboard.kde.org/r/128664/</a>
  </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Please test out all possible workflows. Ideally it would be great if we \
could have automated tests for all the workflows with tags.</p></pre>  <br />







<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/128664/diff/2/?file=474817#file474817line95" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/file/basicindexingjob.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">95</font></th>  <td bgcolor="#ffffff" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">bool</span> \
<span class="n">BasicIndexingJob</span><span class="o">::</span><span \
class="n">indexXAttr</span><span class="p">(</span><span class="k">const</span> <span \
class="n">QString</span><span class="o">&amp;</span> <span class="n">url</span><span \
class="p">,</span> <span class="n">Document</span><span class="o">&amp;</span> <span \
class="n">doc</span><span class="p">)</span></pre></td>  <th bgcolor="#f0f0f0" \
style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">95</font></th>  <td bgcolor="#ffffff" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">bool</span> \
<span class="n">BasicIndexingJob</span><span class="o">::</span><span \
class="n">indexXAttr</span><span class="p">(</span><span class="k">const</span> <span \
class="n">QString</span><span class="o">&amp;</span> <span class="n">url</span><span \
class="p">,</span> <span class="n">Document</span><span class="o">&amp;</span> <span \
class="n">doc</span><span class="p">)</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Please add a test for this -</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">We have a \
basicindexingjobtest file where the tests were "temporarily" removed. They clearly \
need to be added again with the behaviour this class expects.</p></pre>  </div>
</div>
<br />

<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/128664/diff/2/?file=474817#file474817line107" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/file/basicindexingjob.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">106</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span \
class="n">doc</span><span class="p">.</span><span \
class="n">addXattrBoolTerm</span><span class="p">(</span><span \
class="n">QByteArray</span><span class="p">(</span><span \
class="s">&quot;TAG-&quot;</span><span class="p">)</span> <span class="o">+</span> \
<span class="n">tag</span><span class="p">.</span><span class="n">toUtf8</span><span \
class="p">());</span></pre></td>  <th bgcolor="#e9eaa8" style="border-left: 1px solid \
#C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">107</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">                <span class="n">doc</span><span \
class="p">.</span><span class="n">addXattrTerm</span><span class="p">(</span><span \
class="n">QByteArray</span><span class="p">(</span><span \
class="s">&quot;TA&quot;</span><span class="p">)</span> <span class="o">+</span> \
<span class="n">tag</span><span class="p">.</span><span class="n">toUtf8</span><span \
class="p">());</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Alright. So now TA instead of being a prefix to store each word, it now \
stores the entire tag.</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">This breaks existing behaviour. That's \
typically frowned upon. Example - All tags with more than 1 word.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Perhaps it would just be easier if we would intrduce a new \
prefix.</p></pre>  </div>
</div>
<br />

<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/128664/diff/2/?file=474818#file474818line91" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kioslaves/tags/kio_tags.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">87</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">TagListJob</span><span class="o">*</span> <span class="n">job</span> <span \
class="o">=</span> <span class="k">new</span> <span class="n">TagListJob</span><span \
class="p">();</span></pre></td>  <th bgcolor="#e9eaa8" style="border-left: 1px solid \
#C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">91</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">        <span class="n">Q_FOREACH</span> <span \
class="p">(</span><span class="k">const</span> <span class="n">QString</span><span \
class="o">&amp;</span> <span class="n">resultTag</span><span class="p">,</span> <span \
class="n">job</span><span class="o">-&gt;</span><span class="n">tags</span><span \
class="p">())</span> <span class="p">{</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">So if \
we only have tag in the form -</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">"Fire/Water"</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">at that point unless one also has the tag "Fire", it will just never show \
up.</p></pre>  </div>
</div>
<br />



<p>- Vishesh Handa</p>


<br />
<p>On August 20th, 2016, 10:58 p.m. UTC, James Smith wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for Baloo and Vishesh Handa.</div>
<div>By James Smith.</div>


<p style="color: grey;"><i>Updated Aug. 20, 2016, 10:58 p.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=334615">334615</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
baloo
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Index and query each tag as a single full term for \
generating recursed search results. Represent nested tags as recursed items in the \
Tags:// KIO Slave.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Compile, run</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/file/basicindexingjob.cpp <span style="color: \
grey">(88bb59a01e5592abb74b1ab345bfc6765d35db57)</span></li>

 <li>src/kioslaves/tags/kio_tags.cpp <span style="color: \
grey">(de2e6d71945632e23a85f831878b4c431360731c)</span></li>

 <li>src/lib/searchstore.cpp <span style="color: \
grey">(060a4fd795ab858eb84526f93f827d09ee85db7c)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/128664/diff/" style="margin-left: \
3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>


--===============5964759505697917154==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic