Skip to content

Commit d6f64a6

Browse files
kderussoelasticsearchmachine
andauthored
Add TOP_SNIPPETS function to return the best snippets for a field (elastic#138940)
* Add TOP_SNIPPETS function to return the best snippets for a field * [CI] Auto commit changes from spotless * Exclude top snippets from CSV tests * Update docs/changelog/138940.yaml * num words and num snippets must be positive integers * PR feedback - create chunking settings and scorer in the evaluator * Clarify query * PR feedback - clean up tests * Make top snippets work with CSV tests * Add spec for null field * [CI] Auto commit changes from spotless * Add null input to verifier test * Ensure verifier tests catch when num_words or num_snippets are not positive integers * Checkstyle fix --------- Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
1 parent 467bc2a commit d6f64a6

File tree

24 files changed

+1166
-50
lines changed

24 files changed

+1166
-50
lines changed

docs/changelog/138940.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 138940
2+
summary: Add TOP_SNIPPETS function to return the best snippets for a field
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

docs/reference/query-languages/esql/_snippets/functions/description/top_snippets.md

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/examples/top_snippets.md

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/functionNamedParams/top_snippets.md

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/layout/top_snippets.md

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/parameters/top_snippets.md

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/types/top_snippets.md

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/images/functions/top_snippets.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/reference/query-languages/esql/kibana/definition/functions/top_snippets.json

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/docs/functions/top_snippets.md

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)