This commit is contained in:
Jean-Francois Dockes 2019-02-14 10:33:29 +01:00
parent 01b2a2ddaa
commit 0e866f1bce
2 changed files with 210 additions and 114 deletions

View File

@ -307,8 +307,18 @@ alink="#0000FF">
</dd> </dd>
</dl> </dl>
</dd> </dd>
<dt><span class="chapter">4. <a href="#RCL.MOVABLE">Movable <dt><span class="chapter">4. <a href=
datasets</a></span></dt> "#RCL.REMOVABLE">Removable volumes</a></span></dt>
<dd>
<dl>
<dt><span class="sect1">4.1. <a href=
"#RCL.REMOVABLE.MAIN">Indexing removable volumes in the
main index</a></span></dt>
<dt><span class="sect1">4.2. <a href=
"#RCL.REMOVABLE.SELF">Self contained
volumes</a></span></dt>
</dl>
</dd>
<dt><span class="chapter">5. <a href= <dt><span class="chapter">5. <a href=
"#RCL.PROGRAM">Programming interface</a></span></dt> "#RCL.PROGRAM">Programming interface</a></span></dt>
<dd> <dd>
@ -5463,19 +5473,71 @@ alink="#0000FF">
<div class="titlepage"> <div class="titlepage">
<div> <div>
<div> <div>
<h1 class="title"><a name="RCL.MOVABLE" id= <h1 class="title"><a name="RCL.REMOVABLE" id=
"RCL.MOVABLE"></a>Chapter&nbsp;4.&nbsp;Movable "RCL.REMOVABLE"></a>Chapter&nbsp;4.&nbsp;Removable
datasets</h1> volumes</h1>
</div> </div>
</div> </div>
</div> </div>
<p>As of <span class="application">Recoll</span> 1.24, it has <p><span class="application">Recoll</span> used to have no
become easy to build self-contained datasets including a support for indexing removable volumes (portable disks, USB
<span class="application">Recoll</span> configuration keys, etc.). Recent versions have improved the situation and
directory and index together with the indexed documents, and support indexing removable volumes in two different ways:</p>
to move such a dataset around (for example copying it to an <div class="itemizedlist">
USB drive), without having to adjust the configuration for <ul class="itemizedlist" style="list-style-type: disc;">
querying the index.</p> <li class="listitem">
<p>By storing a volume index on the volume itself
(<span class="application">Recoll</span> 1.24).</p>
</li>
<li class="listitem">
<p>By indexing the volume in the main, fixed, index,
and ensuring that the volume data is not purged if the
indexing runs while the volume is mounted.
(<span class="application">Recoll</span> 1.25.2).</p>
</li>
</ul>
</div>
<div class="sect1">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name=
"RCL.REMOVABLE.MAIN" id=
"RCL.REMOVABLE.MAIN"></a>4.1.&nbsp;Indexing removable
volumes in the main index</h2>
</div>
</div>
</div>
<p>As of version 1.25.2, <span class=
"application">Recoll</span> has a simple way to ensure that
the index data for an absent volume will not be purged: the
volume mount point must be a member of the <code class=
"literal">topdirs</code> list, and the mount directory must
be empty (when the volume is not mounted). If <span class=
"command"><strong>recollindex</strong></span> finds that
one of the <code class="literal">topdirs</code> is empty
when starting up, any existing data for the tree will be
preserved by the indexing pass (no purge for this
area).</p>
</div>
<div class="sect1">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name=
"RCL.REMOVABLE.SELF" id=
"RCL.REMOVABLE.SELF"></a>4.2.&nbsp;Self contained
volumes</h2>
</div>
</div>
</div>
<p>As of <span class="application">Recoll</span> 1.24, it
has become easy to build self-contained datasets including
a <span class="application">Recoll</span> configuration
directory and index together with the indexed documents,
and to move such a dataset around (for example copying it
to an USB drive), without having to adjust the
configuration for querying the index.</p>
<div class="note" style= <div class="note" style=
"margin-left: 0.5in; margin-right: 0.5in;"> "margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3> <h3 class="title">Note</h3>
@ -5540,28 +5602,30 @@ recollindex -c "$confdir"
</li> </li>
<li class="listitem"> <li class="listitem">
<p>The configuration directory must exist with the <p>The configuration directory must exist with the
documents, somewhere under the directory which will be documents, somewhere under the directory which will
moved. E.g. if you are moving <code class= be moved. E.g. if you are moving <code class=
"filename">/home/me/mydata</code> around, the "filename">/home/me/mydata</code> around, the
configuration directory must exist somewhere below this configuration directory must exist somewhere below
point, for example <code class= this point, for example <code class=
"filename">/home/me/mydata/recoll-confdir</code>, or "filename">/home/me/mydata/recoll-confdir</code>, or
<code class= <code class=
"filename">/home/me/mydata/sub/recoll-confdir</code>.</p> "filename">/home/me/mydata/sub/recoll-confdir</code>.</p>
</li> </li>
<li class="listitem"> <li class="listitem">
<p>You should keep the default locations for the index <p>You should keep the default locations for the
elements (they are relative to the configuration index elements (they are relative to the
directory by default). Only the paths referring to the configuration directory by default). Only the paths
documents themselves (e.g. <code class= referring to the documents themselves (e.g.
"literal">topdirs</code> values) should be absolute (in <code class="literal">topdirs</code> values) should
general, they are only used when indexing anyway).</p> be absolute (in general, they are only used when
indexing anyway).</p>
</li> </li>
</ul> </ul>
</div> </div>
<p>Only the first point needs an explicit user action, the <p>Only the first point needs an explicit user action, the
<span class="application">Recoll</span> defaults are <span class="application">Recoll</span> defaults are
compatible with the second one, and the third is natural.</p> compatible with the second one, and the third is
natural.</p>
<p>If, after the move, the configuration directory needs to <p>If, after the move, the configuration directory needs to
be copied out of the dataset (for example because the thumb be copied out of the dataset (for example because the thumb
drive is too slow), you can set the <a class="link" href= drive is too slow), you can set the <a class="link" href=
@ -5571,27 +5635,30 @@ recollindex -c "$confdir"
"filename">/home/me/mydata</code> is now mounted onto "filename">/home/me/mydata</code> is now mounted onto
<code class="filename">/media/me/somelabel</code>, but the <code class="filename">/media/me/somelabel</code>, but the
configuration directory and index has been copied to configuration directory and index has been copied to
<code class="filename">/tmp/tempconfig</code>, you would set <code class="filename">/tmp/tempconfig</code>, you would
<code class="literal">curidxconfdir</code> to <code class= set <code class="literal">curidxconfdir</code> to
<code class=
"filename">/media/me/somelabel/recoll-confdir</code> inside "filename">/media/me/somelabel/recoll-confdir</code> inside
<code class="filename">/tmp/tempconfig/recoll.conf</code>. <code class="filename">/tmp/tempconfig/recoll.conf</code>.
<code class="literal">orgidxconfdir</code> would still be <code class="literal">orgidxconfdir</code> would still be
<code class="filename">/home/me/mydata/recoll-confdir</code> <code class=
in the original and the copy.</p> "filename">/home/me/mydata/recoll-confdir</code> in the
<p>If you are regularly copying the configuration out of the original and the copy.</p>
dataset, it will be useful to write a script to automate the <p>If you are regularly copying the configuration out of
procedure. This can't really be done inside <span class= the dataset, it will be useful to write a script to
"application">Recoll</span> because there are probably many automate the procedure. This can't really be done inside
possible variants. One example would be to copy the <span class="application">Recoll</span> because there are
configuration to make it writable, but keep the index data on probably many possible variants. One example would be to
the medium because it is too big - in this case, the script copy the configuration to make it writable, but keep the
would also need to set <code class="literal">dbdir</code> in index data on the medium because it is too big - in this
the copied configuration.</p> case, the script would also need to set <code class=
"literal">dbdir</code> in the copied configuration.</p>
<p>The same set of modifications (<span class= <p>The same set of modifications (<span class=
"application">Recoll</span> 1.24) has also made it possible "application">Recoll</span> 1.24) has also made it possible
to run queries from a readonly configuration directory (with to run queries from a readonly configuration directory
slightly reduced function of course, such as not recording (with slightly reduced function of course, such as not
the query history).</p> recording the query history).</p>
</div>
</div> </div>
<div class="chapter"> <div class="chapter">
<div class="titlepage"> <div class="titlepage">

View File

@ -4207,8 +4207,37 @@
</chapter> <!-- Search --> </chapter> <!-- Search -->
<chapter id="RCL.MOVABLE"> <chapter id="RCL.REMOVABLE">
<title>Movable datasets</title> <title>Removable volumes</title>
<para>&RCL; used to have no support for indexing removable volumes
(portable disks, USB keys, etc.). Recent versions have improved the
situation and support indexing removable volumes in two different
ways:</para>
<itemizedlist>
<listitem><para>By storing a volume index on the volume
itself (&RCL; 1.24).</para></listitem>
<listitem><para>By indexing the volume in the main, fixed, index, and
ensuring that the volume data is not purged if the indexing runs
while the volume is mounted. (&RCL; 1.25.2).</para></listitem>
</itemizedlist>
<sect1 id="RCL.REMOVABLE.MAIN">
<title>Indexing removable volumes in the main index</title>
<para>As of version 1.25.2, &RCL; has a simple way to ensure that the
index data for an absent volume will not be purged: the volume mount
point must be a member of the <literal>topdirs</literal> list, and
the mount directory must be empty (when the volume is not
mounted). If <command>recollindex</command> finds that one of the
<literal>topdirs</literal> is empty when starting up, any existing
data for the tree will be preserved by the indexing
pass (no purge for this area).</para>
</sect1>
<sect1 id="RCL.REMOVABLE.SELF">
<title>Self contained volumes</title>
<para>As of &RCL; 1.24, it has become easy to build self-contained <para>As of &RCL; 1.24, it has become easy to build self-contained
datasets including a &RCL; configuration directory and index together datasets including a &RCL; configuration directory and index together
@ -4323,7 +4352,7 @@ recollindex -c "$confdir"
possible to run queries from a readonly configuration directory (with possible to run queries from a readonly configuration directory (with
slightly reduced function of course, such as not recording the query slightly reduced function of course, such as not recording the query
history).</para> history).</para>
</sect1>
</chapter> </chapter>
<chapter id="RCL.PROGRAM"> <chapter id="RCL.PROGRAM">