1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" lang=
"en-US" xml:
lang=
"en-US">
7 * Copyright 2008-2009, Haiku. All rights reserved.
8 * Distributed under the terms of the MIT License.
11 * Humdinger <humdingerb@gmail.com>
14 <meta http-equiv=
"content-type" content=
"text/html; charset=utf-8" />
15 <meta http-equiv=
"Content-Style-Type" content=
"text/css" />
16 <meta name=
"robots" content=
"all" />
18 <meta name=
"viewport" content=
"width=device-width, initial-scale=1.0" />
19 <link rel=
"stylesheet" type=
"text/css" href=
"../Haiku-doc.css" />
24 <div><span>User guide
</span></div>
29 <ul class=
"lang-menu">
30 <li class=
"now"><img src=
"../images/flags/gb.png" alt=
"" /> English
</li>
31 <li><a href=
"../ca/index.html"><img src=
"../images/flags/ca.png" alt=
"" />Català
</a></li>
32 <li><a href=
"../de/index.html"><img src=
"../images/flags/de.png" alt=
"" />Deutsch
</a></li>
33 <li><a href=
"../es/index.html"><img src=
"../images/flags/es.png" alt=
"" />Español
</a></li>
34 <li><a href=
"../fr/index.html"><img src=
"../images/flags/fr.png" alt=
"" />Français
</a></li>
35 <li><a href=
"../it/index.html"><img src=
"../images/flags/it.png" alt=
"" />Italiano
</a></li>
36 <li><a href=
"../hu/index.html"><img src=
"../images/flags/hu.png" alt=
"" />Magyar
</a></li>
37 <li><a href=
"../pl/index.html"><img src=
"../images/flags/pl.png" alt=
"" />Polski
</a></li>
38 <li><a href=
"../pt_PT/index.html"><img src=
"../images/flags/pt_PT.png" alt=
"" />Português
</a></li>
39 <li><a href=
"../pt_BR/index.html"><img src=
"../images/flags/pt_BR.png" alt=
"" />Português (Brazil)
</a></li>
40 <li><a href=
"../ro/index.html"><img src=
"../images/flags/ro.png" alt=
"" />Română
</a></li>
41 <li><a href=
"../sk/index.html"><img src=
"../images/flags/sk.png" alt=
"" />Slovenčina
</a></li>
42 <li><a href=
"../fi/index.html"><img src=
"../images/flags/fi.png" alt=
"" />Suomi
</a></li>
43 <li><a href=
"../sv_SE/index.html"><img src=
"../images/flags/sv_SE.png" alt=
"" />Svenska
</a></li>
44 <li><a href=
"../zh_CN/index.html"><img src=
"../images/flags/zh_CN.png" alt=
"" /> 中文 [中文]
</a></li>
45 <li><a href=
"../ru/index.html"><img src=
"../images/flags/ru.png" alt=
"" />Русский
</a></li>
46 <li><a href=
"../uk/index.html"><img src=
"../images/flags/uk.png" alt=
"" />Українська
</a></li>
47 <li><a href=
"../jp/index.html"><img src=
"../images/flags/jp.png" alt=
"" />日本語
</a></li>
50 «
<a href=
"attributes.html">Attributes
</a>
51 ::
<a href=
"contents.html" class=
"uplink">Contents
</a>
52 ::
<a href=
"queries.html">Queries
</a> »
61 <p><a href=
"attributes.html">Attributes
</a> and
<a href=
"queries.html">Queries
</a> are key features of Haiku. While attributes are useful on their own, to display additional information on a file, for a query on them, they need to be indexed. It puts them into a lookup table, which in turn makes queries lightning fast.
<br />
62 The index is part of the filesystem and is kept for every volume/partition separately.
</p>
65 Indexing commands in Terminal
</h2>
66 <p>There are several commands to manage the index:
</p>
68 <li><b>lsindex
</b> - Displays the indexed attributes on the current volume/partition.
<br />
69 These are the attributes that are indexed by default:
</li>
71 <pre class=
"terminal"> ~ -
>lsindex
106 be:deskbar_item_status
112 <li><b>mkindex
</b> - Adds an attribute to the index of a volume/partition.
</li>
114 <pre>Usage: mkindex [options]
<attribute
>
115 Creates a new index for the specified attribute.
117 -d, --volume=PATH a path on the volume to which the index will be added,
118 defaults to current volume.
119 -t, --type=TYPE the type of the attribute being indexed. One of
"int",
120 "llong",
"string",
"float", or
"double".
121 Defaults to
"string".
122 --copy-from path to volume to copy the indexes from.
123 -v, --verbose print information about the index being created
126 <p>Only
<b>new
</b> files with that attribute come automatically into the index!
<br />
127 Existing files have to be added manually by copying them and deleting the originals after that. Alternatively you can use the command
<span class=
"cli">reindex
</span>.
130 <li><b>reindex
</b> - Puts the attributes of existing files into the newly created index of a volume/partition.
</li>
132 <pre>Usage: reindex [-rvf] attr
<list of filenames and/or directories
>
133 -r enter directories recursively
135 -f create/update all indices from the source volume,
136 "attr" is the path to the source volume
140 <li><b>rmindex
</b> - Removes an attribute from the index of a volume/partition.
</li>
142 <pre>Usage: rmindex [OPTION]... INDEX_NAME
144 Removes the index named INDEX_NAME from a disk volume. Once this has been
145 done, it will no longer be possible to use the query system to search for
146 files with the INDEX_NAME attribute.
148 -d, --volume=PATH a path on the volume from which the index will be
150 -h, --help display this help and exit
151 -p, --pattern INDEX_NAME is a pattern
152 -v, --verbose print information about the index being removed
154 INDEX_NAME is the name of a file attribute.
156 If no volume is specified, the volume of the current directory is assumed.
</pre>
162 <div class=
"inner"><span>
163 «
<a href=
"attributes.html">Attributes
</a>
164 ::
<a href=
"contents.html" class=
"uplink">Contents
</a>
165 ::
<a href=
"queries.html">Queries
</a> »