Skip to content

Commit e7ec2ce

Browse files
committed
skills: fix response field path and cap detection in validate-search-filters
- Fix total.value -> hits.total.value (correct OpenSearch response path). - Replace the "exactly 10,000" heuristic with hits.total.relation: 'eq' means exact, 'gte' means lower bound. - Fix remaining 'aggregation count queries' -> 'count-only queries' in Step 8. Assisted-by: github-copilot:claude-sonnet-4.6 Signed-off-by: Eric Searcy <eric@linuxfoundation.org>
1 parent 3b60dfb commit e7ec2ce

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • .agents/skills/validate-search-filters

.agents/skills/validate-search-filters/SKILL.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ NATS box. This is the primary evidence step. Use the `$NATS_POD` and
155155
`$OPENSEARCH_BASEURL` variables set in Step 1.
156156

157157
> **Note:** These queries omit `track_total_hits: true`, so `hits.total.value`
158-
> may be capped at 10,000 on very large indices. This is intentional — an
159-
> approximate count is sufficient to confirm a field is populated. If a count
160-
> comes back at exactly 10,000, treat it as "≥10,000 hits" rather than a
161-
> precise figure.
158+
> may be capped on very large indices. This is intentional — an approximate
159+
> count is sufficient to confirm a field is populated. Check `hits.total.relation`
160+
> in the response: `"eq"` means the count is exact; `"gte"` means it is a lower
161+
> bound and the true total is higher.
162162
163163
**Count documents where a specific tag key has non-empty values (last 45 days):**
164164

@@ -203,7 +203,7 @@ kubectl exec -n lfx "$NATS_POD" -- \
203203
}'
204204
```
205205

206-
Record the `total.value` from each response. A non-zero count confirms the
206+
Record the `hits.total.value` from each response. A non-zero count confirms the
207207
key/prefix is present in recently indexed data. If the count is zero but the
208208
resource type has older data, note it as "not seen in last 45 days" rather
209209
than immediately marking it broken.
@@ -283,6 +283,6 @@ After applying fixes, run `make build` to confirm compilation succeeds.
283283

284284
## Step 8 — Verify fixes
285285

286-
Re-run the aggregation count queries from Step 4 against the corrected
286+
Re-run the count-only queries from Step 4 against the corrected
287287
mechanism to confirm non-zero results. Report before/after hit counts for
288288
each fixed filter.

0 commit comments

Comments
 (0)