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

List:       kde-devel
Subject:    Re: Review Request 128738: Quote all prefix search values, if operator is = or :.
From:       James Smith <smithjd15 () gmail ! com>
Date:       2016-08-31 21:29:41
Message-ID: 20160831212941.21343.77599 () mimi ! kde ! org
[Download RAW message or body]

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



> On Aug. 29, 2016, 8:13 a.m., Pinak Ahuja wrote:
> > Hi, could you add a little more details as to why this is needed/what cases it \
> > improves or fixes. And maybe some unit tests would be nice. :)

The arguments with quotes are stripped by the shell, breaking any results for queries \
with spaces. This patch encapsulates arguments with a recognized search operator and \
prefix into quotation marks, allowing multi-word match results.

This is a no-brainer improvement over escaping the quotes on the search line, which \
following a prefix and operator should not be without surrounding quotes anyway.


- James


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


On Aug. 24, 2016, 3:26 p.m., James Smith wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128738/
> -----------------------------------------------------------
> 
> (Updated Aug. 24, 2016, 3:26 p.m.)
> 
> 
> Review request for Baloo and Vishesh Handa.
> 
> 
> Repository: baloo
> 
> 
> Description
> -------
> 
> Add quotation marks surrounding the search term for all searches matching operator \
> = or :. 
> 
> Diffs
> -----
> 
> src/tools/baloosearch/main.cpp 8fabdbb 
> 
> Diff: https://git.reviewboard.kde.org/r/128738/diff/
> 
> 
> Testing
> -------
> 
> Compile, run.
> 
> 
> Thanks,
> 
> James Smith
> 
> 


--===============3893784624962547313==
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/128738/">https://git.reviewboard.kde.org/r/128738/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On August 29th, 2016, 8:13 a.m. UTC, <b>Pinak \
Ahuja</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <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;">Hi, could you add a little more details as to why this \
is needed/what cases it improves or fixes. And maybe some unit tests would be nice. \
:)</p></pre>  </blockquote>







</blockquote>

<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;">The \
arguments with quotes are stripped by the shell, breaking any results for queries \
with spaces. This patch encapsulates arguments with a recognized search operator and \
prefix into quotation marks, allowing multi-word match results.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">This is a no-brainer improvement over escaping the quotes on the search \
line, which following a prefix and operator should not be without surrounding quotes \
anyway.</p></pre> <br />










<p>- James</p>


<br />
<p>On August 24th, 2016, 3:26 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. 24, 2016, 3:26 p.m.</i></p>









<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;">Add quotation marks surrounding the search term for \
all searches matching operator = or :.</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/tools/baloosearch/main.cpp <span style="color: grey">(8fabdbb)</span></li>

</ul>

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






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







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


--===============3893784624962547313==--


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

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