Back to mnoGoSearch site

IndexIf

Name

IndexIf -- allows indexing documents whose section matches the given pattern

indexer.conf

Synopsis

IndexIf [Match | NoMatch] [NoCase | Case] [String | Regex] {Section} {Pattern...}

Description

Allows indexing of documents, whose section matches the given pattern. Use in combination with NoIndexIf.

First three optional parameters describe the type of comparison. Default values are Match, NoCase, String.

The Section parameter specified which section is checked against the pattern. It can also be a combination of several sections by using ${SECTION} syntax.

See also Allow.

You may use several patterns in the same "IndexIf" command. You may use this command any times.

Takes global effect for config file.

Examples


# Example1: Don't index a document if its Body section contains "porno"
NoIndexIf Body *porno*
IndexIf Body *

# Example2: Index only those documents with Title section containing "reference"
IndexIf Title *reference*
NoIndexIf Title *

# Example3: Allow indexing of text/plain documents only from the given site.
IndexIf "${URL}#${Content-Type}" "http://site/*#text/plain"
NoIndexIf Content-Type text/plain

See also

Index, NoIndexIf, Robots.