doc: clarify phrase vs proximity

This commit is contained in:
Jean-Francois Dockes 2022-08-02 14:58:38 +02:00
parent 5ef20d0d69
commit 34e88e587d
2 changed files with 110 additions and 65 deletions

View File

@ -430,7 +430,7 @@ alink="#0000FF">
<div class="list-of-tables"> <div class="list-of-tables">
<p><b>List of Tables</b></p> <p><b>List of Tables</b></p>
<dl> <dl>
<dt>3.1. <a href="#idm1526">Keyboard shortcuts</a></dt> <dt>3.1. <a href="#idm1532">Keyboard shortcuts</a></dt>
</dl> </dl>
</div> </div>
<div class="chapter"> <div class="chapter">
@ -3804,25 +3804,44 @@ fs.inotify.max_user_watches=32768
accept a mix of single words and phrases enclosed in accept a mix of single words and phrases enclosed in
double quotes. Stemming and wildcard expansion will be double quotes. Stemming and wildcard expansion will be
performed as for simple search.</p> performed as for simple search.</p>
<p><b>Phrases and Proximity searches.&nbsp;</b>These <div class="sect4">
two clauses work in similar ways, with the difference <div class="titlepage">
that proximity searches do not impose an order on the <div>
words. In both cases, an adjustable number (slack) of <div>
non-matched words may be accepted between the searched <h5 class="title"><a name=
ones (use the counter on the left to adjust this "RCL.SEARCH.GUI.COMPLEX.PHRASEANDPROX" id=
count). For phrases, the default count is zero (exact "RCL.SEARCH.GUI.COMPLEX.PHRASEANDPROX"></a>Phrase
match). For proximity it is ten (meaning that two and Proximity searches</h5>
search terms, would be matched if found within a window </div>
of twelve words). Examples: a phrase search for </div>
<code class="literal">quick fox</code> with a slack of </div>
0 will match <code class="literal">quick fox</code> but <p>These two clauses look for a group of terms in
not <code class="literal">quick brown fox</code>. With specified relative positions. They differ in the
a slack of 1 it will match the latter, but not sense that the order of input terms is significant
<code class="literal">fox quick</code>. A proximity for <code class="literal">phrase</code> searches, but
search for <code class="literal">quick fox</code> with not for <code class="literal">proximity</code>
the default slack will match the latter, and also searches. The latter do not impose an order on the
<code class="literal">a fox is a cunning and quick words. In both cases, an adjustable number (slack) of
animal</code>.</p> non-matched words may be accepted between the
searched ones. For <code class=
"literal">phrase</code> searches, the default count
is zero (exact match). For <code class=
"literal">proximity</code> searches it is ten
(meaning that two search terms, would be matched if
found within a window of twelve words).</p>
<p>Examples: a phrase search for <code class=
"literal">quick fox</code> with a slack of 0 will
match <code class="literal">quick fox</code> but not
<code class="literal">quick brown fox</code>. With a
slack of 1 it will match the latter, but not
<code class="literal">fox quick</code>. A proximity
search for <code class="literal">quick fox</code>
with the default slack will match the latter, and
also <code class="literal">a fox is a cunning and
quick animal</code>.</p>
<p>The slack can be adjusted with the counter to the
left of the input area</p>
</div>
</div> </div>
<div class="sect3"> <div class="sect3">
<div class="titlepage"> <div class="titlepage">
@ -4188,7 +4207,7 @@ fs.inotify.max_user_watches=32768
<span class="guilabel">Shortcut</span> column, and type <span class="guilabel">Shortcut</span> column, and type
the desired sequence.</p> the desired sequence.</p>
<div class="table"> <div class="table">
<a name="idm1526" id="idm1526"></a> <a name="idm1532" id="idm1532"></a>
<p class="title"><b>Table&nbsp;3.1.&nbsp;Keyboard <p class="title"><b>Table&nbsp;3.1.&nbsp;Keyboard
shortcuts</b></p> shortcuts</b></p>
<div class="table-contents"> <div class="table-contents">
@ -5449,13 +5468,16 @@ text/html [file:///Users/uncrypted-dockes/projets/bateaux/ilur/factEtCie/r
<p>An element preceded by a <code class= <p>An element preceded by a <code class=
"literal">-</code> specifies a term that should "literal">-</code> specifies a term that should
<span class="emphasis"><em>not</em></span> appear.</p> <span class="emphasis"><em>not</em></span> appear.</p>
<p>As usual, words inside quotes define a phrase (the <p>By default, words inside double-quotes define a
order of words is significant), so that <em class= <code class="literal">phrase</code> search (the order of
words is significant), so that <em class=
"replaceable"><code>title:"prejudice pride"</code></em> "replaceable"><code>title:"prejudice pride"</code></em>
is not the same as <em class= is not the same as <em class=
"replaceable"><code>title:prejudice "replaceable"><code>title:prejudice
title:pride</code></em>, and is unlikely to find a title:pride</code></em>, and is unlikely to find a
result.</p> result. This can be changed by using <a class="link"
href="#RCL.SEARCH.LANG.MODIFIERS" title=
"3.5.4.&nbsp;Modifiers">modifiers</a>.</p>
<p>Words inside phrases and capitalized words are not <p>Words inside phrases and capitalized words are not
stem-expanded. Wildcards may be used anywhere inside a stem-expanded. Wildcards may be used anywhere inside a
term. Specifying a wildcard on the left of a term can term. Specifying a wildcard on the left of a term can
@ -5860,19 +5882,30 @@ text/html [file:///Users/uncrypted-dockes/projets/bateaux/ilur/factEtCie/r
"application">Recoll</span> 1.22 and later).</p> "application">Recoll</span> 1.22 and later).</p>
</li> </li>
<li class="listitem"> <li class="listitem">
<p><code class="literal">o</code> can be used to <p><code class="literal">p</code> can be used to
specify a "slack" for phrase and proximity turn an ordered <code class="literal">phrase</code>
searches: the number of additional terms that may search into an unordered <code class=
be found between the specified ones. If "literal">proximity</code> one. Example:
<code class="literal">o</code> is followed by an <code class="literal">"order any in"p</code>. You
integer number, this is the slack, else the default can find a little more detail about <code class=
is 10.</p> "literal">phrase</code> and <code class=
"literal">proximity</code> searches <a class="link"
href="#RCL.SEARCH.GUI.COMPLEX.PHRASEANDPROX" title=
"Phrase and Proximity searches">here</a>.</p>
</li> </li>
<li class="listitem"> <li class="listitem">
<p><code class="literal">p</code> can be used to <p><code class="literal">o</code> can be used to
turn the default phrase search into a proximity one specify a "slack" for both <code class=
(unordered). Example: <code class="literal">"order "literal">phrase</code> and <code class=
any in"p</code></p> "literal">proximity</code> searches: the number of
additional terms that may be found between the
specified ones. If <code class="literal">o</code>
is followed by an integer number, this is the
slack, else the default is 10. The default slack
(with no <code class="literal">o</code>) is 0 for
<code class="literal">phrase</code> searches and 10
for <code class="literal">proximity</code>
searches.</p>
</li> </li>
<li class="listitem"> <li class="listitem">
<p><code class="literal">C</code> will turn on case <p><code class="literal">C</code> will turn on case

View File

@ -2692,24 +2692,29 @@ fs.inotify.max_user_watches=32768
Stemming and wildcard expansion will be performed as for simple Stemming and wildcard expansion will be performed as for simple
search. </para> search. </para>
<formalpara><title>Phrases and Proximity searches</title> <sect4 id="RCL.SEARCH.GUI.COMPLEX.PHRASEANDPROX">
<para>These two clauses work in similar ways, with the difference <title>Phrase and Proximity searches</title>
that proximity searches do not impose an order on the words. In <para>These two clauses look for a group of terms in
both cases, an adjustable number (slack) of non-matched words may specified relative positions. They differ in the sense that the order of input terms
be accepted between the searched ones (use the counter on the is significant for <literal>phrase</literal> searches, but not
left to adjust this count). For phrases, the default count is for <literal>proximity</literal> searches. The latter do not impose an order on the
zero (exact match). For proximity it is ten (meaning that two words. In both cases, an adjustable number (slack) of non-matched words may be
search terms, would be matched if found within a window of twelve accepted between the searched ones. For <literal>phrase</literal> searches, the
words). Examples: a phrase search for default count is zero (exact match). For <literal>proximity</literal> searches it is
<literal>quick fox</literal> with a slack of 0 will match ten (meaning that two search terms, would be matched if found within a window of
<literal>quick fox</literal> but not twelve words). </para>
<literal>quick brown fox</literal>. With <para>Examples: a phrase search for
a slack of 1 it will match the latter, but not <literal>quick fox</literal> with a slack of 0 will match
<literal>fox quick</literal>. A proximity search for <literal>quick fox</literal> but not
<literal>quick fox</literal> with the default slack will <literal>quick brown fox</literal>. With
match the latter, and also a slack of 1 it will match the latter, but not
<literal>a fox is a cunning and quick animal</literal>.</para> <literal>fox quick</literal>. A proximity search for
</formalpara> <literal>quick fox</literal> with the default slack will
match the latter, and also
<literal>a fox is a cunning and quick animal</literal>.</para>
<para>The slack can be adjusted with the counter to the left of the
input area</para>
</sect4>
</sect3> </sect3>
@ -4030,10 +4035,12 @@ text/html [file:///Users/uncrypted-dockes/projets/bateaux/ilur/factEtCie/r
<para>An element preceded by a <literal>-</literal> specifies a <para>An element preceded by a <literal>-</literal> specifies a
term that should <emphasis>not</emphasis> appear.</para> term that should <emphasis>not</emphasis> appear.</para>
<para>As usual, words inside quotes define a phrase (the order of words is significant), so <para>By default, words inside double-quotes define a <literal>phrase</literal> search (the
that <replaceable>title:"prejudice pride"</replaceable> is not the same order of words is significant), so
as <replaceable>title:prejudice title:pride</replaceable>, and is unlikely to find a that <replaceable>title:"prejudice pride"</replaceable> is not the same
result.</para> as <replaceable>title:prejudice title:pride</replaceable>, and is unlikely to find a
result. This can be changed by
using <link linkend="RCL.SEARCH.LANG.MODIFIERS">modifiers</link>. </para>
<para>Words inside phrases and capitalized words are not stem-expanded. Wildcards may be used <para>Words inside phrases and capitalized words are not stem-expanded. Wildcards may be used
anywhere inside a term. Specifying a wildcard on the left of a term can produce a very slow anywhere inside a term. Specifying a wildcard on the left of a term can produce a very slow
@ -4323,16 +4330,21 @@ text/html [file:///Users/uncrypted-dockes/projets/bateaux/ilur/factEtCie/r
&RCL; 1.22 and later).</para> &RCL; 1.22 and later).</para>
</listitem> </listitem>
<listitem><para><literal>o</literal> can be used to specify a <listitem><para><literal>p</literal> can be used to turn an ordered
"slack" for phrase and proximity searches: the number of <literal>phrase</literal> search into an unordered <literal>proximity</literal>
additional terms that may be found between the specified one. Example: <literal>"order any in"p</literal>. You can find a little more detail
ones. If <literal>o</literal> is followed by an integer number, about <literal>phrase</literal> and <literal>proximity</literal> searches
this is the slack, else the default is 10.</para> <link linkend="RCL.SEARCH.GUI.COMPLEX.PHRASEANDPROX">here</link>.</para>
</listitem> </listitem>
<listitem><para><literal>p</literal> can be used to turn the <listitem><para><literal>o</literal> can be used to specify a
default phrase search into a proximity one "slack" for both <literal>phrase</literal> and <literal>proximity</literal> searches:
(unordered). Example: <literal>"order any in"p</literal></para> the number of
additional terms that may be found between the specified
ones. If <literal>o</literal> is followed by an integer number,
this is the slack, else the default is 10. The default slack (with
no <literal>o</literal>) is 0 for <literal>phrase</literal> searches and 10 for
<literal>proximity</literal> searches.</para>
</listitem> </listitem>
<listitem><para><literal>C</literal> will turn on case <listitem><para><literal>C</literal> will turn on case