Skip to content

armgit / xerj

Public Imported from GitHub
0

AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.

427 B
Raw Blame
#!/bin/bash
# Per-index doc counts for all ax* indices on an endpoint, sorted, one per line.
# Usage: collect_counts.sh <url> [prefix]
URL="${1:?url}"; PFX="${2:-ax}"
curl -s "$URL/_refresh" > /dev/null
curl -s "$URL/_cat/indices" | awk -v p="$PFX" '$3 ~ "^"p {print $3}' | sort | while read -r idx; do
  c=$(curl -s "$URL/$idx/_count" | python3 -c 'import sys,json;print(json.load(sys.stdin)["count"])')
  echo "$idx $c"
done