-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* #29 Adding support for msearch. Signed-off-by: jzonthemtn <[email protected]> * #29 Updating docker and dependencies for 3.0.0 Signed-off-by: jzonthemtn <[email protected]> * #29 Simplifying docker for 3.0.0. Signed-off-by: jzonthemtn <[email protected]> * #29 Removing comment and will write issue for it. Signed-off-by: jzonthemtn <[email protected]> --------- Signed-off-by: jzonthemtn <[email protected]> Signed-off-by: Jeff Zemerick <[email protected]>
- Loading branch information
1 parent
dca7e02
commit 1e92b6d
Showing
6 changed files
with
181 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
FROM opensearchproject/opensearch:2.16.0 | ||
FROM opensearchstaging/opensearch:3.0.0 | ||
|
||
COPY ./build/distributions/opensearch-ubi-2.16.0.0.zip /tmp/ | ||
ARG UBI_VERSION="3.0.0.0-SNAPSHOT" | ||
|
||
RUN /usr/share/opensearch/bin/opensearch-plugin install --batch telemetry-otel | ||
RUN /usr/share/opensearch/bin/opensearch-plugin install --batch file:/tmp/opensearch-ubi-2.16.0.0.zip | ||
COPY ./build/distributions/opensearch-ubi-${UBI_VERSION}.zip /tmp/ | ||
|
||
# Required for OTel capabilities. | ||
#RUN /usr/share/opensearch/bin/opensearch-plugin install --batch telemetry-otel | ||
|
||
RUN /usr/share/opensearch/bin/opensearch-plugin install --batch file:/tmp/opensearch-ubi-${UBI_VERSION}.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash -e | ||
|
||
curl -s -X GET "http://localhost:9200/_msearch" -H 'Content-Type: application/json' -d' | ||
{ "index": "ecommerce"} | ||
{ "query": { "match_all": {} }, "ext": { "ubi": { "query_id": "11111" } } } | ||
{ "index": "ecommerce"} | ||
{ "query": { "match_all": {} }, "ext": { "ubi": { "query_id": "22222" } } } | ||
' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
src/yamlRestTest/resources/rest-api-spec/test/_plugins.ubi/30_msearch_queries_with_ubi.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
"Query": | ||
|
||
- do: | ||
indices.delete: | ||
index: ubi_queries | ||
ignore_unavailable: true | ||
|
||
- do: | ||
indices.create: | ||
index: ecommerce1 | ||
body: | ||
mappings: | ||
{ "properties": { "category": { "type": "text" } } } | ||
|
||
- match: { acknowledged: true } | ||
- match: { index: "ecommerce1"} | ||
|
||
- do: | ||
indices.create: | ||
index: ecommerce2 | ||
body: | ||
mappings: | ||
{ "properties": { "category": { "type": "text" } } } | ||
|
||
- match: { acknowledged: true } | ||
- match: { index: "ecommerce2"} | ||
|
||
- do: | ||
index: | ||
index: ecommerce1 | ||
id: 1 | ||
body: { category: notebook } | ||
|
||
- match: { result: created } | ||
|
||
- do: | ||
index: | ||
index: ecommerce2 | ||
id: 1 | ||
body: { category: notebook } | ||
|
||
- match: { result: created } | ||
|
||
- do: | ||
indices.refresh: | ||
index: [ "ecommerce1" ] | ||
|
||
- do: | ||
indices.refresh: | ||
index: [ "ecommerce2" ] | ||
|
||
- do: | ||
msearch: | ||
rest_total_hits_as_int: true | ||
body: | ||
- index: ecommerce1 | ||
- {query: {match_all: {}}, "ext": {"ubi": {"query_id": "12345"}}} | ||
- index: ecommerce2 | ||
- {query: {match_all: {}}, "ext": {"ubi": {"query_id": "12345"}}} | ||
|
||
- match: { responses.0.hits.total: 1} | ||
- match: { responses.1.hits.total: 1} | ||
|
||
- do: | ||
cluster.health: | ||
index: [ubi_queries] | ||
wait_for_no_initializing_shards: true | ||
|
||
- do: | ||
indices.exists: | ||
index: ubi_queries | ||
|
||
- is_true: '' |