Repository navigation
Conversation
Signed-off-by: Navneet Verma <navneev@amazon.com>
|
In the next PR I will add the support of faiss engine using cosinesiml distance function. I didn't add that functionality because faiss is only getting used when filters are present. |
|
@navneet1v we've missed this one. will review until end of next week. thank you for raising this! |
Ports the engine-agnostic OpenSearch optimizations from the Python tool (#7) that apply to our lucene-engine index: - kNN warmup: GET /_plugins/_knn/warmup/<index> in setup_search so the first queries aren't penalised by cold-cache graph loading. Best-effort (non-success is logged, not fatal); verified accepted on lucene indices. - Search response trimming: _source:false + docvalue_fields:[_id] + stored_fields:_none_ so only the id is returned. Parsing reads fields._id[0] with a fallback to top-level _id (new hit_id helper). - Indexing tuning: number_of_replicas:0 and refresh_interval:-1 during upload, with an explicit refresh() after upload (before force_merge) so documents become searchable. Intentionally NOT ported: the faiss/nmslib engine switch and the native-only knn.memory.circuit_breaker.limit / index_thread_qty cluster settings. v1 keeps the lucene engine, which is required for the efficient kNN filtering fix (#59); those knobs don't apply to lucene. Verified end-to-end against OpenSearch 2.19.2: random-100 recall stays 1.0000 with trimming + refresh + warmup (a regression to 0.0 without the refresh confirmed the fix is load-bearing). Unit tests cover build_knn_body trimming and hit_id docvalue/fallback parsing. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks for these OpenSearch optimizations, @navneet1v — closing as superseded by the Rust rewrite ( |
… in duration mode (#152) Reliability fixes from the full Redis-vs-Vertex end-to-end run (issue #151), the localized/validatable subset: - #3 `--engines-file` was a silent no-op: `read_engine_configs()` globbed `experiments/configurations/*.json` and ignored the flag, so `--engines-file x.json --engines my-cfg` failed with a confusing "no engines match". Now `read_engine_configs(engines_file)` reads ONLY that file when given; a missing/malformed file is a hard error, not a fall-through. Verified end-to-end (the file's config runs) + unit-tested. - #1 Vertex stream-update upload treated a transient HTTP 401 as fatal, aborting mid-stream and leaving a partially-populated index that returns silently-wrong recall. Now a 401 re-mints the access token and retries the (idempotent) batch (bounded, same shape as the existing 429/Retry-After handling). This plus the existing per-worker 45-min proactive refresh covers #2 (token expiry) for the long-upload path. - #6 `--repetitions` (default 3, best-of-N) is meaningless in --search-duration timed mode — it just triples runtime for an upward-biased max. Force 1 there, warning if the user set >1. Deferred (own PRs, noted on the issue): #4 Redis M×EFC index-name collision (tests hardcode "idx"; needs Redis/Valkey/Dragonfly validation), #5 per-search watchdog, #7 Vertex indexSyncTime wait, #8 streaming percentiles. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Description
This PR added the optimization for Opensearch engine in this benchmarking tool. Along with the optimizations I have also upgraded the OS docker image to latest version(at the time of raising this PR) which is 2.14
Testing
I performed a local testing on a small dataset and a small configuration and I can see improvements in Opensearch results.
Sample run results
Cluster: single node with CI based docker setup
Indexing
Search
Please let me know if I need add this in upstream qadrant repo.