Skip to content
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

Elasticsearch: Use array of strings as index in backend queries #67276

Merged
merged 1 commit into from Apr 26, 2023

Conversation

ivanahuckova
Copy link
Member

Part of #54011

Based on https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html#search-multi-search-api-request-body we are changing index in backend request's header to be array of strings, rather then comma separated list.

The test have been updated.

To test, run queries and ensure that they are working.

@ivanahuckova ivanahuckova added datasource/Elasticsearch type/refactor no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes labels Apr 26, 2023
@ivanahuckova ivanahuckova added this to the 10.0.0 milestone Apr 26, 2023
@ivanahuckova ivanahuckova requested a review from gabor April 26, 2023 11:40
@ivanahuckova ivanahuckova self-assigned this Apr 26, 2023
@ivanahuckova ivanahuckova requested a review from a team as a code owner April 26, 2023 11:40
@github-actions
Copy link
Contributor

Backend code coverage report for PR #67276

Plugin Main PR Difference
elasticsearch 89.0% 89.0% 0%

@github-actions
Copy link
Contributor

Frontend code coverage report for PR #67276
No changes

Copy link
Contributor

@gabor gabor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@@ -207,7 +207,7 @@ func (c *baseClientImpl) createMultiSearchRequests(searchRequests []*SearchReque
header: map[string]interface{}{
"search_type": "query_then_fetch",
"ignore_unavailable": true,
"index": strings.Join(c.indices, ","),
"index": c.indices,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat :)

@ivanahuckova ivanahuckova merged commit d0ced39 into main Apr 26, 2023
20 checks passed
@ivanahuckova ivanahuckova deleted the ivana/es-backend-index-array branch April 26, 2023 14:07
@zerok zerok modified the milestones: 10.0.0, 10.0.0-preview May 31, 2023
gabor added a commit that referenced this pull request Jul 10, 2023
gabor added a commit that referenced this pull request Jul 11, 2023
…#71284)

* Revert "Elasticsearch: Use array of strings as index in backend queries (#67276)"

This reverts commit d0ced39.

* updated tests
grafana-delivery-bot bot pushed a commit that referenced this pull request Jul 11, 2023
…#71284)

* Revert "Elasticsearch: Use array of strings as index in backend queries (#67276)"

This reverts commit d0ced39.

* updated tests

(cherry picked from commit e17540b)
gabor added a commit that referenced this pull request Jul 11, 2023
…ted string (#71322)

Elasticsearch: Fix using multiple indexes with comma separated string (#71284)

* Revert "Elasticsearch: Use array of strings as index in backend queries (#67276)"

This reverts commit d0ced39.

* updated tests

(cherry picked from commit e17540b)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
polibb pushed a commit that referenced this pull request Jul 14, 2023
…#71284)

* Revert "Elasticsearch: Use array of strings as index in backend queries (#67276)"

This reverts commit d0ced39.

* updated tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend datasource/Elasticsearch no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes type/refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants