Download this file

index.html    110 lines (95 with data), 3.9 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
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&nbsp;-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&nbsp;index&nbsp;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&nbsp;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>