indextool is one of the helper tools within
the Sphinx package, introduced in version 0.9.9-rc2. It is used to
dump miscellaneous debug information about the physical index.
(Additional functionality such as index verification is planned
in the future, hence the indextool name rather than just indexdump.)
Its general usage is:
indextool <command> [options]
The only currently available option applies to all commands and lets you specify the configuration file:
--config <file> (-c <file> for short)
overrides the built-in config file names.
The commands are as follows:
--dumpheader FILENAME.sph quickly dumps
the provided index header file without touching any other index files
or even the configuration file. The report provides a breakdown of
all the index settings, in particular the entire attribute and
field list. Prior to 0.9.9-rc2, this command was present in
CLI search utility.
--dumpconfig FILENAME.sph dumps
the index definition from the given index header file in (almost)
compliant sphinx.conf file format.
Added in version 2.0.1-beta.
--dumpheader INDEXNAME dumps index header
by index name with looking up the header path in the configuration file.
--dumpdocids INDEXNAME dumps document IDs
by index name. It takes the data from attribute (.spa) file and therefore
requires docinfo=extern to work.
--dumphitlist INDEXNAME KEYWORD dumps all
the hits (occurences) of a given keyword in a given index, with keyword
specified as text.
--dumphitlist INDEXNAME --wordid ID dumps all
the hits (occurences) of a given keyword in a given index, with keyword
specified as internal numeric ID.
--htmlstrip INDEXNAME filters stdin using
HTML stripper settings for a given index, and prints the filtering
results to stdout. Note that the settings will be taken from sphinx.conf,
and not the index header.
--check INDEXNAME checks the index data
files for consistency errors that might be introduced either by bugs
in indexer and/or hardware faults. Starting with
version 2.0.2-beta, --check also works on RT indexes,
but checks disk chunks only.
--strip-path strips the path names from
all the file names referenced from the index (stopwords, wordforms,
exceptions, etc). This is useful for checking indexes built on another
machine with possibly different path layouts.