-
Notifications
You must be signed in to change notification settings - Fork 800
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
Add thin ES clients #5162
Add thin ES clients #5162
Conversation
9cd06bb
to
d16137d
Compare
Since there seems to be a substantial amount of new code in here: (part of this is that I'm simply unfamiliar with this code, it might be obvious) |
As this and #5168 are related, let me add some more context here:
To reuse business logic while using different versions of Elasticsearch/OpenSearch, we have to keep "versioned" clients small and only doing client/server communication. #5168 adds a possibility to build queries in identical way but without depending on external packages/structs. The code in this PR is not used right now, but needs to be wired in the next PR: |
c2f5411
to
4670263
Compare
|
||
if esResult != nil && esResult.Hits != nil { | ||
for _, h := range esResult.Hits.Hits { | ||
hits = append(hits, &client.SearchHit{Source: *h.Source}) |
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.
the nil
check is missing in Search
func
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.
added
if len(esResult.Aggregations) > 0 { | ||
result.Aggregations = make(map[string]json.RawMessage, len(esResult.Aggregations)) | ||
for key, agg := range esResult.Aggregations { | ||
result.Aggregations[key] = *agg |
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.
the nil
check is missing in Search
func
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.
nil check is added
20598ff
to
81a7b69
Compare
commit eade936 Author: David Porter <david.porter@uber.com> Date: Wed Apr 12 13:54:13 2023 -0700 Corrects the config-store handling for not-found errors (#5203) commit 9fc4485 Author: lancezhao-ins <99238165+lancezhao-ins@users.noreply.github.com> Date: Tue Apr 11 04:21:15 2023 +1000 Allow registering search attributes without Advance Visibility enabled (#5185) * remove validation & test for add search attribute with no advanced config - Remove validation for Advance Visibility Store - Add Advance Visibility Config check before update ElasticSearch/OpenSearch mapping - Remove co-related test for 'no advanced config' * Update CHANGELOG.md Update CHANGELOG.md * Add warn level message if skip updating OpenSearch/ElasticSearch mapping * Add warn level message and add validSearchAttributes in development.yaml --------- Co-authored-by: Quanzheng Long <prclqz@gmail.com> commit d165c7b Author: neil-xie <104041627+neil-xie@users.noreply.github.com> Date: Mon Apr 10 10:46:04 2023 -0700 Update idls version (#5200) commit b2bc8bf Author: Mantas Šidlauskas <mantass@netapp.com> Date: Mon Apr 10 20:12:53 2023 +0300 Add thin ES clients (#5162) * Add thin ES clients
commit eade936 Author: David Porter <david.porter@uber.com> Date: Wed Apr 12 13:54:13 2023 -0700 Corrects the config-store handling for not-found errors (#5203) commit 9fc4485 Author: lancezhao-ins <99238165+lancezhao-ins@users.noreply.github.com> Date: Tue Apr 11 04:21:15 2023 +1000 Allow registering search attributes without Advance Visibility enabled (#5185) * remove validation & test for add search attribute with no advanced config - Remove validation for Advance Visibility Store - Add Advance Visibility Config check before update ElasticSearch/OpenSearch mapping - Remove co-related test for 'no advanced config' * Update CHANGELOG.md Update CHANGELOG.md * Add warn level message if skip updating OpenSearch/ElasticSearch mapping * Add warn level message and add validSearchAttributes in development.yaml --------- Co-authored-by: Quanzheng Long <prclqz@gmail.com> commit d165c7b Author: neil-xie <104041627+neil-xie@users.noreply.github.com> Date: Mon Apr 10 10:46:04 2023 -0700 Update idls version (#5200) commit b2bc8bf Author: Mantas Šidlauskas <mantass@netapp.com> Date: Mon Apr 10 20:12:53 2023 +0300 Add thin ES clients (#5162) * Add thin ES clients Merge issue
commit b18be27 Author: Mantas Šidlauskas <mantass@netapp.com> Date: Tue Apr 18 14:12:09 2023 +0300 Add generic ES query building utilities (#5168) commit 824f0ac Author: agautam478 <72432016+agautam478@users.noreply.github.com> Date: Fri Apr 14 13:37:29 2023 -0700 Fixed the nil pointer issues in the InactiveDomain Invariant (#5213) commit c5678dd Author: Ketsia <115650494+ketsiambaku@users.noreply.github.com> Date: Wed Apr 12 15:21:10 2023 -0700 Fix consistent query metric (#5170) * add shardid tag to log * remove counter for overall scope * fix lint commit eade936 Author: David Porter <david.porter@uber.com> Date: Wed Apr 12 13:54:13 2023 -0700 Corrects the config-store handling for not-found errors (#5203) commit 9fc4485 Author: lancezhao-ins <99238165+lancezhao-ins@users.noreply.github.com> Date: Tue Apr 11 04:21:15 2023 +1000 Allow registering search attributes without Advance Visibility enabled (#5185) * remove validation & test for add search attribute with no advanced config - Remove validation for Advance Visibility Store - Add Advance Visibility Config check before update ElasticSearch/OpenSearch mapping - Remove co-related test for 'no advanced config' * Update CHANGELOG.md Update CHANGELOG.md * Add warn level message if skip updating OpenSearch/ElasticSearch mapping * Add warn level message and add validSearchAttributes in development.yaml --------- Co-authored-by: Quanzheng Long <prclqz@gmail.com> commit d165c7b Author: neil-xie <104041627+neil-xie@users.noreply.github.com> Date: Mon Apr 10 10:46:04 2023 -0700 Update idls version (#5200) commit b2bc8bf Author: Mantas Šidlauskas <mantass@netapp.com> Date: Mon Apr 10 20:12:53 2023 +0300 Add thin ES clients (#5162) * Add thin ES clients
What changed?
v6
andv7
ES clients compatible with new interfaceWhy?
Bulk processor was moved to avoid cyclic dependency between
elasticsearch
package and ES clientsNew ES clients need to wired in a separate PR
How did you test it?
Potential risks
Release notes
Documentation Changes