ReferenceAsk
Remy Reference/admin/Count chunks
?

Count chunks

Counts the chunks in a corpus that match a metadata filter or text query, without returning them.
admin.dataSources.count({ slug, filter?, contains?, phrase?, candidate? })

Returns how many chunks match, without fetching any, so you can size a corpus or a subset before a search or a bulk delete. Narrow it with --filter on metadata, --contains for words, or --phrase for an exact string, and add --candidate to count against a rebuild in progress rather than what is live.

Parameters
--source
string
Corpus slug. Defaults to "default".
--filter
k=v,...|json
Metadata filter the chunks must match.
--contains
words
Words that must appear in the chunk.
--phrase
text
An exact phrase the chunk must contain.
--candidate
flag
Count against a rebuild in progress rather than what is live.
CLI
remy-admin datasources count --source policies --filter department=legal