--- a
+++ b/website/howtos/use_multiple_indexes/index.html
@@ -0,0 +1,109 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+ <head>
+ <title>Recoll howtos</title>
+
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <meta name="Author" content="Jean-Francois Dockes">
+ <meta name="Description" content=
+ "recoll is a simple full-text search system for unix and linux
+ based on the powerful and mature xapian engine">
+ <meta name="Keywords" content=
+ "full text search, desktop search, unix, linux">
+ <meta http-equiv="Content-language" content="en">
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <meta name="robots" content="All,Index,Follow">
+
+ <link type="text/css" rel="stylesheet" href="../../styles/style.css">
+ </head>
+
+ <body>
+
+ <div class="rightlinks">
+ <ul>
+ <li><a href="../../index.html">Home</a></li>
+ <li><a href="../../doc.html">Documentation</a></li>
+ <li><a href="../index.html">Howtos</a></li>
+ </ul>
+ </div>
+
+ <div class="content">
+
+ <h1>Creating and using multiple indexes</h1>
+
+ <h2>Why would you want to do this ?</h2>
+ <ul>
+ <li>Easy adjustment of search areas: you can filter
+ results by using the directory filter in the advanced search
+ panel, but, if you have separate well defined places where
+ you store different kind of data, it is easier to maintain
+ separate index and use the <em>External indexes</em> dialog
+ to switch them on or off, and it will also yield much better
+ search performance.</li>
+ <li>Shared indexes: it may be useful to maintain one or
+ several indexes for shared data, and separate personal
+ indexes for each user.</li>
+ </ul>
+
+ <h2>How to do it</h2>
+
+ <p>As an example we'll suppose that you
+ have <span class="application">Recoll</span> installed and indexing your
+ home directory, and that you would like to have a separate index
+ for <tt class="filename">/usr/shared/doc</tt>.</p>
+
+ <p>You need to create a separate configuration for the new index,
+ then add it to the external indexes list in the user
+ interface, and activate it as needed. </p>
+
+ <ol>
+ <li>Create a directory for the new index:
+ <pre>cd
+mkdir .recoll-sharedoc
+ </pre>
+ </li>
+ <li>Create a minimal configuration file:
+ <pre>cd .recoll-sharedoc
+echo "topdirs = /usr/share/doc" > recoll.conf
+ </pre>
+ </li>
+ <li>Perform initial indexing:
+ <pre>recollindex -c ~/.recoll-sharedoc</pre>
+ </li>
+ <li>Optionally set up cron to perform nightly indexing, use
+ <pre>crontab -e</pre>
+ and insert a line like the following:
+ <pre>45 20 * * * recollindex -c ~/.recoll-sharedoc</pre>
+ This would start the indexing at
+ 20:45. <tt class="command">crontab -e</tt> will use the
+ <tt class="command">vi</tt> editor by default, you can
+ change this by using the <tt class="command">EDITOR</tt>
+ environment variable. Exemple:
+ <pre>EDITOR=kate crontab -e</pre>
+ Your favorite desktop may also have a dedicated tool to add
+ <tt class="filename">crontab</tt> entries.
+ </li>
+ <li>Start <tt class="command">recoll</tt> and choose
+ the <span
+ class="guimenu">Preferences->External index dialog</span>
+ menu entry, then click the <span class="guilabel">Browse</span> button
+ (near the bottom), and select the new index Xapian database
+ directory:
+ <pre><tt class="filename">~/.recoll-sharedoc/xapiandb</tt></pre>
+ Then click <span class="guilabel">Add index</span>.
+ </li>
+ <li>You can then activate or deactivate the new index by
+ clicking the box in front of the directory name in the list.
+ </li>
+ </ol>
+
+ <p>When adding an index shared by multiple users, it may
+ be helpful to use
+ the <tt class="variable">RECOLL_EXTRA_DBS</tt> environment
+ variable instead of editing individual configurations, see the
+ manual for more details.</p>
+
+ </div>
+ </body>
+</html>