Skip to content

Commit

Permalink
Merge pull request #52 from elastic/add-multisearch
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshMock committed Nov 14, 2023
2 parents 7d00ef0 + 97cbbfa commit 0905a8c
Show file tree
Hide file tree
Showing 9 changed files with 500 additions and 62 deletions.
2 changes: 1 addition & 1 deletion packages/enterprise-search/docs/overview.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The syntax should look like this:
----
{
"dependencies": {
"@elastic/enterprise-search": "^8.6.0"
"@elastic/enterprise-search": "^8.6.1"
}
}
----
Expand Down
4 changes: 4 additions & 0 deletions packages/enterprise-search/docs/release-notes/8-6-1.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[#release-notes-8-6-1]
=== 8.6.1 release notes

* Updated APIs to include missing changes from the 8.6 specification.
4 changes: 3 additions & 1 deletion packages/enterprise-search/docs/release-notes/index.asciidoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[#release-notes]
== Release Notes

* <<release-notes-8-6-1, 8.6.1 Release Notes>>
* <<release-notes-8-6-0, 8.6.0 Release Notes>>
include::8-6-0.asciidoc[]
include::8-6-1.asciidoc[]
include::8-6-0.asciidoc[]
2 changes: 1 addition & 1 deletion packages/enterprise-search/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elastic/enterprise-search",
"version": "8.6.0",
"version": "8.6.1",
"description": "Official Node.js client for Elastic Enterprise Search, App Search, and Workplace Search.",
"main": "index.js",
"types": "index.d.ts",
Expand Down
46 changes: 44 additions & 2 deletions packages/enterprise-search/src/api/app/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,20 @@ export default class API {
}, options)
}

async searchEsSearch_v0 (this: That, params: T.SearchEsSearchV0Request, options?: TransportRequestOptions): Promise<T.SearchEsSearchV0Response> {
const {
engine_name,
body,
...querystring
} = params ?? {}
return await this.transport.request<T.SearchEsSearchV0Response>({
method: 'POST',
path: `/api/as/v0/engines/${engine_name}/elasticsearch/_search`,
querystring,
body: body
}, options)
}

async searchEsSearch (this: That, params: T.SearchEsSearchRequest, options?: TransportRequestOptions): Promise<T.SearchEsSearchResponse> {
const {
engine_name,
Expand All @@ -887,7 +901,7 @@ export default class API {
} = params ?? {}
return await this.transport.request<T.SearchEsSearchResponse>({
method: 'POST',
path: `/api/as/v0/engines/${engine_name}/elasticsearch/_search`,
path: `/api/as/v1/engines/${engine_name}/elasticsearch/_search`,
querystring,
body: body
}, options)
Expand Down Expand Up @@ -961,6 +975,34 @@ export default class API {
}, options)
}

async multiSearch (this: That, params: T.MultiSearchRequest, options?: TransportRequestOptions): Promise<T.MultiSearchResponse> {
const {
engine_name,
body,
...querystring
} = params ?? {}
return await this.transport.request<T.MultiSearchResponse>({
method: 'POST',
path: `/api/as/v1/engines/${engine_name}/multi_search`,
querystring,
body: body
}, options)
}

async search_explain_v0 (this: That, params: T.SearchExplainV0Request, options?: TransportRequestOptions): Promise<T.SearchExplainV0Response> {
const {
engine_name,
body,
...querystring
} = params ?? {}
return await this.transport.request<T.SearchExplainV0Response>({
method: 'POST',
path: `/api/as/v0/engines/${engine_name}/search_explain`,
querystring,
body: body
}, options)
}

async search_explain (this: That, params: T.SearchExplainRequest, options?: TransportRequestOptions): Promise<T.SearchExplainResponse> {
const {
engine_name,
Expand All @@ -969,7 +1011,7 @@ export default class API {
} = params ?? {}
return await this.transport.request<T.SearchExplainResponse>({
method: 'POST',
path: `/api/as/v0/engines/${engine_name}/search_explain`,
path: `/api/as/v1/engines/${engine_name}/search_explain`,
querystring,
body: body
}, options)
Expand Down
Loading

0 comments on commit 0905a8c

Please sign in to comment.