public-inbox-cindex(1)

PUBLIC-INBOX-CINDEX(1) public-inbox user manual PUBLIC-INBOX-CINDEX(1)

NAME

public-inbox-cindex - create and update code repository search indices

SYNOPSIS

public-inbox-cindex [OPTIONS] -g GIT_DIR [-g GIT_DIR]...

public-inbox-cindex [OPTIONS] --update

DESCRIPTION

public-inbox-cindex creates and updates the Xapian search index for git code repository ("coderepo") search. It can also associate (fuzzy join) coderepos with Xapian-indexed inboxes. It only indexes commit messages and diffs as they would show up in an email. It does not index the contents of blobs directly.

Like inbox indices, coderepo indices can either be internal or external to a coderepo. Either way, they're both created and updated through public-inbox-cindex.

Once the initial indices are created by public-inbox-cindex, the "--update" switch will incrementally update them.

OPTIONS

-d EXTDIR
Use the given directory as an external index. External indices are generally recommended to internal indices since they do not need write access to any code repositories themselves. They are highly recommended when many repositories share a common history or if there is an M:N relationship between inboxes and coderepos.
-j JOBS
--jobs=JOBS
Influences the number of Xapian indexing shards.

If the repo has not been indexed or initialized, "JOBS - 1" shards will be created.

Default: the number of existing Xapian shards

--reindex
Forces a re-index of all commits. This can be used for in-place upgrades and bugfixes while read-only processes are utilizing the index.
--update
-u
Incrementally index all previously-indexed coderepos.
--prune
Removes commits which are no longer accessible via git. Use this after git-gc(1) (or git-prune(1)).
--no-fsync
--dangerous
--max-size SIZE
--batch-size SIZE
These affect the coderepo index the same way they affect inbox indices. See public-inbox-index(1).

FILES

For internal indices, the Xapian DB is stored in "$GIT_DIR/public-inbox-cindex".

External indices are stored wherever "-d" EXTDIR points.

CONFIGURATION

publicinbox.indexMaxSize
publicinbox.indexBatchSize
These configuration knobs affect the coderepo index the same way they affect inbox indices. See public-inbox-index(1).

ENVIRONMENT

PI_CONFIG
Used to override the default "~/.public-inbox/config" value.
XAPIAN_FLUSH_THRESHOLD
The number of documents to update before committing changes to disk. This variable is handled directly by Xapian, refer to Xapian API documentation for more details.

Use "publicinbox.indexBatchSize" instead.

UPGRADING

Occasionally, public-inbox will update its schema version and require a full reindex by running this command with "--reindex".

CONTACT

Feedback welcome via plain-text mail to <mailto:meta@public-inbox.org>

The mail archives are hosted at <https://public-inbox.org/meta/> and <http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/>

COPYRIGHT

Copyright all contributors <mailto:meta@public-inbox.org>

License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>

SEE ALSO

public-inbox-index(1)

1993-10-02 public-inbox.git