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

update es to support muti platform #40

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

linuzb
Copy link
Collaborator

@linuzb linuzb commented Nov 8, 2023

  1. update elasticsearch to 7.x
  2. fix container status
  3. add docker-build-push pipeline for mutiplatform

@hnhbwlp
Copy link
Collaborator

hnhbwlp commented Nov 8, 2023

Why does it need to modify the index type? What is the difference between _doc and data?

@linuzb
Copy link
Collaborator Author

linuzb commented Nov 8, 2023

Why does it need to modify the index type? What is the difference between _doc and data?

@hnhbwlp They are all mapping types. What are mapping types?

Custom mapping types were supported in Elasticsearch before version 5.x . You could have multiple mapping types in a single index.

However, starting from version 6.x, an index only supports one mapping type, which can still be customized. Why are mapping types being removed?

In version 7.x, the default type is _doc (custom types can still be used, but it is not recommended). Creating a mapping with a specified mapping type is not supported in version 7.x. Additionally, the new index API format in version 7.x is PUT /{index}/_doc/{id} and POST {index}/_doc. It is important to note that for the sake of API compatibility, _doc is not a type but a permanent part of the API request path.

Therefore, I removed the _doc type in mapping creation and replaced all custom data with _doc.

Starting from Elasticsearch 8.x, custom types are no longer supported.

@larryck
Copy link
Collaborator

larryck commented Nov 9, 2023

It's LGTM.

Why does it need to modify the index type? What is the difference between _doc and data?

@hnhbwlp They are all mapping types. What are mapping types?

Custom mapping types were supported in Elasticsearch before version 5.x . You could have multiple mapping types in a single index.

However, starting from version 6.x, an index only supports one mapping type, which can still be customized. Why are mapping types being removed?

In version 7.x, the default type is _doc (custom types can still be used, but it is not recommended). Creating a mapping with a specified mapping type is not supported in version 7.x. Additionally, the new index API format in version 7.x is PUT /{index}/_doc/{id} and POST {index}/_doc. It is important to note that for the sake of API compatibility, _doc is not a type but a permanent part of the API request path.

Therefore, I removed the _doc type in mapping creation and replaced all custom data with _doc.

Starting from Elasticsearch 8.x, custom types are no longer supported.

It's LGTM. We need to upgrade to newer version of es in the long run. As far as I know, this PR has run properly on several arm machines.

@larryck larryck merged commit 1bbf3db into alipay:cross-arch-support Nov 9, 2023
2 checks passed
@linuzb linuzb mentioned this pull request Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants