diff --git a/src/doc/user/usermanual.html b/src/doc/user/usermanual.html index fc22e43e..6f4dfb2c 100644 --- a/src/doc/user/usermanual.html +++ b/src/doc/user/usermanual.html @@ -307,8 +307,18 @@ alink="#0000FF"> -
4. Movable - datasets
+
4. Removable volumes
+
+
+
4.1. Indexing removable volumes in the + main index
+
4.2. Self contained + volumes
+
+
5. Programming interface
@@ -5463,34 +5473,86 @@ alink="#0000FF">
-

Chapter 4. Movable - datasets

+

Chapter 4. Removable + volumes

-

As of Recoll 1.24, it has - become easy to build self-contained datasets including a - Recoll 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.

-
-

Note

-

This is a query-time feature only. The index must only - be updated in its original location. If an update is - necessary in a different location, the index must be - reset.

+

Recoll 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:

+
+
    +
  • +

    By storing a volume index on the volume itself + (Recoll 1.24).

    +
  • +
  • +

    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. + (Recoll 1.25.2).

    +
  • +
-

To make a long story short, here follows a script to - create a Recoll - configuration and index under a given directory (given as - single parameter). The resulting data set (files + recoll - directory) can later to be moved to a CDROM or thumb drive. - Longer explanations come after the script.

-
#!/bin/sh
+      
+
+
+
+

4.1. Indexing removable + volumes in the main index

+
+
+
+

As of version 1.25.2, Recoll 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 topdirs list, and the mount directory must + be empty (when the volume is not mounted). If recollindex finds that + one of the topdirs is empty + when starting up, any existing data for the tree will be + preserved by the indexing pass (no purge for this + area).

+
+
+
+
+
+

4.2. Self contained + volumes

+
+
+
+

As of Recoll 1.24, it + has become easy to build self-contained datasets including + a Recoll 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.

+
+

Note

+

This is a query-time feature only. The index must only + be updated in its original location. If an update is + necessary in a different location, the index must be + reset.

+
+

To make a long story short, here follows a script to + create a Recoll + configuration and index under a given directory (given as + single parameter). The resulting data set (files + recoll + directory) can later to be moved to a CDROM or thumb drive. + Longer explanations come after the script.

+
#!/bin/sh
 
 fatal()
 {
@@ -5519,79 +5581,84 @@ confdir=`pwd`
 
 recollindex -c "$confdir"
 
-

The examples below will assume that you have a dataset - under /home/me/mydata/, with - the index configuration and data stored inside /home/me/mydata/recoll-confdir.

-

In order to be able to run queries after the dataset has - been moved, you must ensure the following:

-
-
    -
  • -

    The main configuration file must define the - orgidxconfdir - variable to be the original location of the - configuration directory (orgidxconfdir=/home/me/mydata/recoll-confdir - must be set inside /home/me/mydata/recoll-confdir/recoll.conf - in the example above).

    -
  • -
  • -

    The configuration directory must exist with the - documents, somewhere under the directory which will be - moved. E.g. if you are moving /home/me/mydata around, the - configuration directory must exist somewhere below this - point, for example /home/me/mydata/recoll-confdir, or - /home/me/mydata/sub/recoll-confdir.

    -
  • -
  • -

    You should keep the default locations for the index - elements (they are relative to the configuration - directory by default). Only the paths referring to the - documents themselves (e.g. topdirs values) should be absolute (in - general, they are only used when indexing anyway).

    -
  • -
+

The examples below will assume that you have a dataset + under /home/me/mydata/, with + the index configuration and data stored inside /home/me/mydata/recoll-confdir.

+

In order to be able to run queries after the dataset has + been moved, you must ensure the following:

+
+
    +
  • +

    The main configuration file must define the + orgidxconfdir + variable to be the original location of the + configuration directory (orgidxconfdir=/home/me/mydata/recoll-confdir + must be set inside /home/me/mydata/recoll-confdir/recoll.conf + in the example above).

    +
  • +
  • +

    The configuration directory must exist with the + documents, somewhere under the directory which will + be moved. E.g. if you are moving /home/me/mydata around, the + configuration directory must exist somewhere below + this point, for example /home/me/mydata/recoll-confdir, or + /home/me/mydata/sub/recoll-confdir.

    +
  • +
  • +

    You should keep the default locations for the + index elements (they are relative to the + configuration directory by default). Only the paths + referring to the documents themselves (e.g. + topdirs values) should + be absolute (in general, they are only used when + indexing anyway).

    +
  • +
+
+

Only the first point needs an explicit user action, the + Recoll defaults are + compatible with the second one, and the third is + natural.

+

If, after the move, the configuration directory needs to + be copied out of the dataset (for example because the thumb + drive is too slow), you can set the curidxconfdir, + variable inside the copied configuration to define the + location of the moved one. For example if /home/me/mydata is now mounted onto + /media/me/somelabel, but the + configuration directory and index has been copied to + /tmp/tempconfig, you would + set curidxconfdir to + /media/me/somelabel/recoll-confdir inside + /tmp/tempconfig/recoll.conf. + orgidxconfdir would still be + /home/me/mydata/recoll-confdir in the + original and the copy.

+

If you are regularly copying the configuration out of + the dataset, it will be useful to write a script to + automate the procedure. This can't really be done inside + Recoll because there are + probably many possible variants. One example would be to + copy the configuration to make it writable, but keep the + index data on the medium because it is too big - in this + case, the script would also need to set dbdir in the copied configuration.

+

The same set of modifications (Recoll 1.24) has also made it possible + to run queries from a readonly configuration directory + (with slightly reduced function of course, such as not + recording the query history).

-

Only the first point needs an explicit user action, the - Recoll defaults are - compatible with the second one, and the third is natural.

-

If, after the move, the configuration directory needs to - be copied out of the dataset (for example because the thumb - drive is too slow), you can set the curidxconfdir, - variable inside the copied configuration to define the - location of the moved one. For example if /home/me/mydata is now mounted onto - /media/me/somelabel, but the - configuration directory and index has been copied to - /tmp/tempconfig, you would set - curidxconfdir to /media/me/somelabel/recoll-confdir inside - /tmp/tempconfig/recoll.conf. - orgidxconfdir would still be - /home/me/mydata/recoll-confdir - in the original and the copy.

-

If you are regularly copying the configuration out of the - dataset, it will be useful to write a script to automate the - procedure. This can't really be done inside Recoll because there are probably many - possible variants. One example would be to copy the - configuration to make it writable, but keep the index data on - the medium because it is too big - in this case, the script - would also need to set dbdir in - the copied configuration.

-

The same set of modifications (Recoll 1.24) has also made it possible - to run queries from a readonly configuration directory (with - slightly reduced function of course, such as not recording - the query history).

diff --git a/src/doc/user/usermanual.xml b/src/doc/user/usermanual.xml index 759e40fe..f21f53c7 100644 --- a/src/doc/user/usermanual.xml +++ b/src/doc/user/usermanual.xml @@ -4207,25 +4207,54 @@ - - Movable datasets + + Removable volumes - As of &RCL; 1.24, it has become easy to build self-contained - datasets including a &RCL; 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. + &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: - This is a query-time feature only. The index must only be - updated in its original location. If an update is necessary in a - different location, the index must be reset. + + By storing a volume index on the volume + itself (&RCL; 1.24). + 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). + - To make a long story short, here follows a script to create a - &RCL; configuration and index under a given directory (given as single - parameter). The resulting data set (files + recoll directory) can later - to be moved to a CDROM or thumb drive. Longer explanations come after - the script. + + Indexing removable volumes in the main index + + 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 topdirs list, and + the mount directory must be empty (when the volume is not + mounted). If recollindex finds that one of the + topdirs is empty when starting up, any existing + data for the tree will be preserved by the indexing + pass (no purge for this area). + + + Self contained volumes + + As of &RCL; 1.24, it has become easy to build self-contained + datasets including a &RCL; 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. + + This is a query-time feature only. The index must only be + updated in its original location. If an update is necessary in a + different location, the index must be reset. + + To make a long story short, here follows a script to create a + &RCL; configuration and index under a given directory (given as single + parameter). The resulting data set (files + recoll directory) can later + to be moved to a CDROM or thumb drive. Longer explanations come after + the script. + #!/bin/sh fatal() @@ -4323,7 +4352,7 @@ recollindex -c "$confdir" possible to run queries from a readonly configuration directory (with slightly reduced function of course, such as not recording the query history). - +