This commit is contained in:
Jean-Francois Dockes 2020-09-02 09:02:23 +02:00
parent 9ae0992296
commit 4df71c4a54
3 changed files with 53 additions and 15 deletions

View File

@ -94,9 +94,9 @@ alink="#0000FF">
<dt><span class="sect2">2.1.3. <a href= <dt><span class="sect2">2.1.3. <a href=
"#idm235">Document types</a></span></dt> "#idm235">Document types</a></span></dt>
<dt><span class="sect2">2.1.4. <a href= <dt><span class="sect2">2.1.4. <a href=
"#idm276">Indexing failures</a></span></dt> "#idm284">Indexing failures</a></span></dt>
<dt><span class="sect2">2.1.5. <a href= <dt><span class="sect2">2.1.5. <a href=
"#idm286">Recovery</a></span></dt> "#idm294">Recovery</a></span></dt>
</dl> </dl>
</dd> </dd>
<dt><span class="sect1">2.2. <a href= <dt><span class="sect1">2.2. <a href=
@ -978,6 +978,22 @@ alink="#0000FF">
<span class="command"><strong>recoll</strong></span> GUI. <span class="command"><strong>recoll</strong></span> GUI.
It is stored in the <code class="filename">missing</code> It is stored in the <code class="filename">missing</code>
text file inside the configuration directory.</p> text file inside the configuration directory.</p>
<p>After installing a missing handler, you may need to
tell <span class=
"command"><strong>recollindex</strong></span> to retry
the failed files, by adding option <code class=
"literal">-k</code> to the command line, or by using the
GUI <span class="guimenu">File</span><span class=
"guimenuitem">Special indexing</span> menu. This is
because <span class=
"command"><strong>recollindex</strong></span>, in its
default operation mode, will not retry files which caused
an error during an earlier pass. In special cases, it may
be useful to reset the data for a category of files
before indexing. See the <span class=
"command"><strong>recollindex</strong></span> manual
page. If your index is not too big, it may be simpler to
just reset it.</p>
<p>By default, <span class="application">Recoll</span> <p>By default, <span class="application">Recoll</span>
will try to index any file type that it has a way to will try to index any file type that it has a way to
read. This is sometimes not desirable, and there are ways read. This is sometimes not desirable, and there are ways
@ -1038,8 +1054,8 @@ alink="#0000FF">
<div class="titlepage"> <div class="titlepage">
<div> <div>
<div> <div>
<h3 class="title"><a name="idm276" id= <h3 class="title"><a name="idm284" id=
"idm276"></a>2.1.4.&nbsp;Indexing failures</h3> "idm284"></a>2.1.4.&nbsp;Indexing failures</h3>
</div> </div>
</div> </div>
</div> </div>
@ -1069,8 +1085,8 @@ alink="#0000FF">
<div class="titlepage"> <div class="titlepage">
<div> <div>
<div> <div>
<h3 class="title"><a name="idm286" id= <h3 class="title"><a name="idm294" id=
"idm286"></a>2.1.5.&nbsp;Recovery</h3> "idm294"></a>2.1.5.&nbsp;Recovery</h3>
</div> </div>
</div> </div>
</div> </div>
@ -1423,8 +1439,8 @@ alink="#0000FF">
<div class="titlepage"> <div class="titlepage">
<div> <div>
<div> <div>
<h4 class="title"><a name="idm407" id= <h4 class="title"><a name="idm415" id=
"idm407"></a>In practise: creating and using an "idm415"></a>In practise: creating and using an
additional index</h4> additional index</h4>
</div> </div>
</div> </div>

View File

@ -452,9 +452,11 @@
<sect2> <sect2>
<title>Document types</title> <title>Document types</title>
<para>&RCL; knows about quite a few different document <para>&RCL; knows about quite a few different document
types. The parameters for document types recognition and types. The parameters for document types recognition and
processing are set in <link linkend="RCL.INDEXING.CONFIG">configuration files</link>. processing are set in <link linkend="RCL.INDEXING.CONFIG">
configuration files</link>.
</para> </para>
<para>Most file types, like HTML or word processing files, only hold <para>Most file types, like HTML or word processing files, only hold
@ -484,6 +486,20 @@
<filename>missing</filename> text file inside the configuration <filename>missing</filename> text file inside the configuration
directory.</para> directory.</para>
<para>After installing a missing handler, you may need to
tell <command>recollindex</command>
to retry the failed files, by adding option <literal>-k</literal>
to the command line, or by using the GUI
<menuchoice>
<guimenu>File</guimenu>
<guimenuitem>Special indexing</guimenuitem>
</menuchoice> menu. This is because <command>recollindex</command>,
in its default operation mode, will not retry files which caused an
error during an earlier pass. In special cases, it may be useful to
reset the data for a category of files before indexing. See
the <command>recollindex</command> manual page. If your index is
not too big, it may be simpler to just reset it.</para>
<para>By default, &RCL; will try to index any file type that <para>By default, &RCL; will try to index any file type that
it has a way to read. This is sometimes not desirable, and it has a way to read. This is sometimes not desirable, and
there are ways to either exclude some types, or on the there are ways to either exclude some types, or on the
@ -493,16 +509,19 @@
<para>Excluding files by name can be done by adding wildcard name <para>Excluding files by name can be done by adding wildcard name
patterns to the patterns to the
<link linkend="RCL.INSTALL.CONFIG.RECOLLCONF.SKIPPEDNAMES">skippedNames</link> <link linkend="RCL.INSTALL.CONFIG.RECOLLCONF.SKIPPEDNAMES">
skippedNames</link>
list, which can be done from the GUI Index configuration list, which can be done from the GUI Index configuration
menu. Excluding by type can be done by setting the menu. Excluding by type can be done by setting the
<link linkend="RCL.INSTALL.CONFIG.RECOLLCONF.EXCLUDEDMIMETYPES">excludedmimetypes</link> <link linkend="RCL.INSTALL.CONFIG.RECOLLCONF.EXCLUDEDMIMETYPES">
excludedmimetypes</link>
list in the configuration file (1.20 and later). This can be list in the configuration file (1.20 and later). This can be
redefined for subdirectories.</para> redefined for subdirectories.</para>
<para>You can also define an exclusive list of MIME types to be <para>You can also define an exclusive list of MIME types to be
indexed (no others will be indexed), by settting indexed (no others will be indexed), by settting
the <link linkend="RCL.INSTALL.CONFIG.RECOLLCONF.INDEXEDMIMETYPES">indexedmimetypes</link> the <link linkend="RCL.INSTALL.CONFIG.RECOLLCONF.INDEXEDMIMETYPES">
indexedmimetypes</link>
configuration variable. Example:<programlisting> configuration variable. Example:<programlisting>
indexedmimetypes = text/html application/pdf indexedmimetypes = text/html application/pdf
</programlisting> </programlisting>

View File

@ -1404,8 +1404,11 @@ unsigned int stringToFlags(const vector<CharFlags>& flags,
stringToTokens(input, toks, sep); stringToTokens(input, toks, sep);
for (auto& tok: toks) { for (auto& tok: toks) {
trimstring(tok); trimstring(tok);
out += std::accumulate(flags.begin(), flags.end(), out, out = std::accumulate(
[&](int o, CharFlags flag){ return tok == flag.yesname ? o | flag.value : o; }); flags.begin(), flags.end(), out,
[&](unsigned int o, CharFlags flag) {
return tok == flag.yesname ? o | flag.value : o;
});
} }
return out; return out;
} }