Commit 279d2ff
committed
Wire IndicesQueryCache into analytics filter delegation path
The analytics engine's Lucene delegation creates a bare IndexSearcher
without the node-level query cache. This means every filter delegation
re-traverses the posting list from scratch, even for repeated text
predicates across queries.
Fix: LucenePlugin exposes setIndicesQueryCache(cache, policy) for node
setup to wire. LuceneAnalyticsBackendPlugin.getFilterDelegationHandle()
attaches the cache to the IndexSearcher it creates.
TODO: wire LucenePlugin.setIndicesQueryCache() from IndicesService during
node startup (requires passing IndicesQueryCache through plugin lifecycle).
Effect: repeated queries on same text term (e.g., match('http') across
14 queries) will cache the BitSet after first evaluation — subsequent
queries return cached result in ~0ms instead of ~300ms.
Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>1 parent 4edd9fc commit 279d2ff
2 files changed
Lines changed: 24 additions & 0 deletions
File tree
- sandbox/plugins/analytics-backend-lucene/src/main/java/org/opensearch/be/lucene
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
61 | 81 | | |
62 | 82 | | |
63 | 83 | | |
| |||
0 commit comments