-
Notifications
You must be signed in to change notification settings - Fork 86
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
Correcting the response format for ingest simulate #3640
Conversation
Following you can find the validation results for the API you have changed.
You can validate this API yourself by using the |
Following you can find the validation results for the API you have changed.
You can validate this API yourself by using the |
|
||
export class Response { | ||
body: { docs: SimulateDocumentResult[] } | ||
} | ||
|
||
export class SimulateDocumentResult { |
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.
we try to avoid duplicate names since it can break certain clients, could we rename this to something else? like SimulateIngestDocumentResult
* | ||
* @behavior_meta AdditionalProperties fieldname=metadata description="Additional metadata" | ||
*/ | ||
export class DocumentSimulation |
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.
same here, coule be IngestDocumentSimulation
?
/** | ||
* | ||
*/ | ||
_version?: Stringified<VersionNumber> |
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.
is _version
actually nullable? checking the server code it seems like it's always added.
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.
You're right -- I had just copy/pasted without looking.
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.
I also realized that error
was in the wrong place (it should be within the doc), and ignored_fields
was missing altogether.
Following you can find the validation results for the API you have changed.
You can validate this API yourself by using the |
* value is larger than the allowed limit would make it through all of the pipoelines, but | ||
* would not be indexed into Elasticsearch. | ||
*/ | ||
ignored_fields?: Array<Dictionary<IgnoredFieldKey, string>> |
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.
this dictionary is always just one "field" + string right? we have the type SingleKeyDictionary if so
ignored_fields?: Array<Dictionary<IgnoredFieldKey, string>> | |
ignored_fields?: Array<SingleKeyDictionary<IgnoredFieldKey, string>> |
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.
At the moment there is a single field. In the future we might expand this to include other fields such as reason
. Should I go with SingleKeyDictionary for now and change it later? Or leave it as is?
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.
let's leave it like this then
Co-authored-by: Laura Trotta <[email protected]>
Following you can find the validation results for the API you have changed.
You can validate this API 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!
* Correcting the response format for ingest simulate * code review feedback * moving error to the correct place, and adding ignored_fields * Update specification/simulate/ingest/SimulateIngestResponse.ts Co-authored-by: Laura Trotta <[email protected]> --------- Co-authored-by: Laura Trotta <[email protected]> (cherry picked from commit 03651cc)
* Correcting the response format for ingest simulate * code review feedback * moving error to the correct place, and adding ignored_fields * Update specification/simulate/ingest/SimulateIngestResponse.ts Co-authored-by: Laura Trotta <[email protected]> --------- Co-authored-by: Laura Trotta <[email protected]> (cherry picked from commit 03651cc)
* Correcting the response format for ingest simulate * code review feedback * moving error to the correct place, and adding ignored_fields * Update specification/simulate/ingest/SimulateIngestResponse.ts Co-authored-by: Laura Trotta <[email protected]> --------- Co-authored-by: Laura Trotta <[email protected]> (cherry picked from commit 03651cc)
* Correcting the response format for ingest simulate * code review feedback * moving error to the correct place, and adding ignored_fields * Update specification/simulate/ingest/SimulateIngestResponse.ts Co-authored-by: Laura Trotta <[email protected]> --------- Co-authored-by: Laura Trotta <[email protected]> (cherry picked from commit 03651cc)
* Correcting the response format for ingest simulate * code review feedback * moving error to the correct place, and adding ignored_fields * Update specification/simulate/ingest/SimulateIngestResponse.ts Co-authored-by: Laura Trotta <[email protected]> --------- Co-authored-by: Laura Trotta <[email protected]> (cherry picked from commit 03651cc) Co-authored-by: Keith Massey <[email protected]>
* Correcting the response format for ingest simulate * code review feedback * moving error to the correct place, and adding ignored_fields * Update specification/simulate/ingest/SimulateIngestResponse.ts Co-authored-by: Laura Trotta <[email protected]> --------- Co-authored-by: Laura Trotta <[email protected]> (cherry picked from commit 03651cc) Co-authored-by: Keith Massey <[email protected]>
* Correcting the response format for ingest simulate * code review feedback * moving error to the correct place, and adding ignored_fields * Update specification/simulate/ingest/SimulateIngestResponse.ts Co-authored-by: Laura Trotta <[email protected]> --------- Co-authored-by: Laura Trotta <[email protected]> (cherry picked from commit 03651cc) Co-authored-by: Keith Massey <[email protected]>
* Correcting the response format for ingest simulate * code review feedback * moving error to the correct place, and adding ignored_fields * Update specification/simulate/ingest/SimulateIngestResponse.ts Co-authored-by: Laura Trotta <[email protected]> --------- Co-authored-by: Laura Trotta <[email protected]> (cherry picked from commit 03651cc) Co-authored-by: Keith Massey <[email protected]>
* [DOCS] Fix overlay for resolve cluster (#3670) * Update specification output * uppercase enum source mode (#3676) * [DOCS] Add overlays for CCR API examples (#3672) * Update inference.update.json with the correct verb (#3688) * Update specification output * [DOCS] Convert final examples from JSON to YAML (#3692) * Update specification output * Correcting the response format for ingest simulate (#3640) * Correcting the response format for ingest simulate * code review feedback * moving error to the correct place, and adding ignored_fields * Update specification/simulate/ingest/SimulateIngestResponse.ts Co-authored-by: Laura Trotta <[email protected]> --------- Co-authored-by: Laura Trotta <[email protected]> * Update specification output * Add text_embedding_bits to inference result output (#3698) * Update specification output * Improve `Analyzer` definitions and fix various classes (#3215) * Update specification output --------- Co-authored-by: Lisa Cawley <[email protected]> Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Laura Trotta <[email protected]> Co-authored-by: David Kyle <[email protected]> Co-authored-by: Keith Massey <[email protected]> Co-authored-by: Ying Mao <[email protected]>
This is an update to #3400. The simulate ingest response is fairly different from the simulate pipeline response, so I've pulled it into its own object.
Specifically, simulate ingest has an
executed_pipelines
array, and it does not have several fields that the simulate pipeline response has.