-
Notifications
You must be signed in to change notification settings - Fork 108
Updated ES specification to support simplified retrievers #4912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds optional query parameters to the ES specification retrievers, enabling simplified text-based searches directly in the retriever definitions.
- Introduces
query
,fields
, andnormalizer
toLinearRetriever
- Introduces
query
andfields
toRRFRetriever
- Aligns the specification with recent Kibana Dev Console changes for simplified retrievers
Comments suppressed due to low confidence (6)
specification/_types/Retriever.ts:72
- Add a JSDoc comment for
query
to explain its purpose, e.g.:/** A query string for a text-based search. */
query?: string
specification/_types/Retriever.ts:73
- Add a JSDoc comment for
fields
to describe which document fields are searched, e.g.:/** The fields to run the query against. */
fields?: string[]
specification/_types/Retriever.ts:74
- Add a JSDoc comment for
normalizer
, e.g.:/** The normalizer to use for scoring. */
, and verify thatScoreNormalizer
is imported or defined above.
normalizer?: ScoreNormalizer
specification/_types/Retriever.ts:142
- Add a JSDoc comment for
query
inRRFRetriever
, e.g.:/** A query string for a text-based search. */
query?: string
specification/_types/Retriever.ts:143
- Add a JSDoc comment for
fields
inRRFRetriever
, e.g.:/** The fields to run the query against. */
fields?: string[]
specification/_types/Retriever.ts:72
- No tests appear to cover the new
query
,fields
, andnormalizer
properties; please add validation tests to ensure they are correctly serialized and validated in the API schema.
query?: string
Following you can find the validation changes against the target branch for the APIs. No changes detected. You can validate these APIs yourself by using the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
(cherry picked from commit 177af77)
(cherry picked from commit 177af77)
) (cherry picked from commit 177af77) Co-authored-by: Mridula <[email protected]>
) (cherry picked from commit 177af77) Co-authored-by: Mridula <[email protected]>
This PR introduces the following optional fields to specification/_types/Retriever.ts:
query?: string
: A query string for a text-based search.fields?: string[]
: The fields to run the query against.normalizer?: ScoreNormalizer
: The normalizer to use for scoring.query?: string
: A query string for a text-based search.fields?: string[]
: The fields to run the query against.These additions allow users to specify a simple query string directly within the retriever, aligning it with recent changes made in the Kibana Dev Console (SEARCH-1091).
Validation
The specification was validated against the
search
API usingmake validate api=search branch=main
.