1.1 KiB
• Added semantic_index/search.sh. It outputs raw JSON from the running HTTP service.
Usage:
semantic_index/search.sh "goods return" customer-service 3 semantic_index/search.sh "candidate follow up" hiring 5 | jq '.results[] | {id, score, citation}'
It defaults to http://127.0.0.1:8787, reads SEMANTIC_INDEX_API_KEY from the environment or semantic_i ndex/.env, and accepts:
semantic_index/search.sh "query text" [project_identifier] [limit]
Verified:
- Script works against the local service.
- Semantic tests still pass: 49 tests, OK.
- Python compile check passed.
› Okay yeah, that's nice and fast
• Good. That script is the right shape for quick manual probing: fast because it avoids Python startup, plain JSON so it pipes cleanly, and thin enough that it won’t hide what the API is returning.
A couple useful examples:
semantic_index/search.sh "goods return" customer-service 3 | jq '.results[].citation' semantic_index/search.sh "candidate follow up" hiring 5 | jq -r '.results[] | "(.score) (.citation.url) (.snippet)"' semantic_index/search.sh "callum@safetagtracking.com" customer-service 3 | jq '.results[0]'