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.

719 B
Raw Blame
ids=$(jq -R . ids.txt | jq -sc .)
curl -s 'localhost:9200/xc-rust-vulns-*/_search' -H 'content-type: application/json' -d "{
  \"size\": 100,
  \"_source\": [\"id\", \"aliases\", \"packages\", \"fixed_versions\", \"origin\", \"source_url\"],
  \"query\": {\"bool\": {\"should\": [{\"terms\": {\"id\": $ids}}, {\"terms\": {\"aliases\": $ids}}]}}
}" | jq -r --argjson ids "$ids" '
  [.hits.hits[]._source] as $h
  | $ids[] as $q
  | ($h | map(select(.id == $q or ((.aliases // []) | index($q)))) | first) as $r
  | if $r then "\($q)  \($r.id)  \(($r.packages // []) | join(","))  fixed \(($r.fixed_versions // []) | join(","))  src \($r.source_url) :: \($r.origin)"
    else "\($q)  NOT FOUND in this pack: abstain" end'