phpbotscout index build¶
Indexes every source that qualifies, whether or not its commit has moved.
Usage¶
$ phpbotscout index build
52 sources: 52 indexed, 0 unchanged, 0 deferred, 0 failed
1721 documents, 11243 chunks
A full build takes a minute or two. The indexing reference has a dated measurement.
What it does¶
- Enumerates the
phpboyscoutnamespace from the forge. - Applies the corpus predicate to each repository, keeping only what qualifies.
- Brings each qualifying repository's clone up to date, cloning it the first time, reads the files the corpus indexes, and writes them as chunks into the SQLite FTS5 index.
The clones are kept on disk under index.clones
and fast-forwarded on later runs. The
indexing reference covers when
a clone is replaced and when one is deleted.
Build or refresh?¶
build fetches every source and re-indexes everything, ignoring recorded
commits. refresh skips sources whose commit has not moved, and
does not fetch a source at all when the forge reports no activity since it was
last fetched.
Use build for the first run, and after anything that changes how content is
chunked or ranked: a migration, a tokenizer change, a new field. Use refresh
for everything else.
Failure is per-source¶
A source that cannot be cloned or read is recorded with its reason and the run
continues. A rate limit is the exception: it stops the run. See
refresh for the reporting shape; it is identical.
Credentials¶
The forge token resolves through the gitlab.auth configuration (an
environment-variable name, a keychain reference, or a literal), falling back to
GITLAB_TOKEN. See the configuration reference.
A token is optional for cloning, since the corpus is public by construction and
a public repository clones unauthenticated; it only costs rate limit. It is
not optional for discovery: reading a repository's Pages settings needs the
Maintainer role, and without it every candidate is reported unresolved.
Cloning over SSH uses index.ssh.key instead, and never
the token.
Flags¶
build defines no flags of its own. Global flags (--config, --debug,
--output, --ci, --accessible) are inherited from the root command.
| Name | Description | Default |
|---|---|---|
-h, --help |
Help for build. |
false |
See also¶
index refresh: re-index only what movedindex sources: what qualifies, and whyindex status: what is indexed, and how stale