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

fix: dpluger can not check keyword on es6 #392

Merged
merged 6 commits into from
Mar 15, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: remove _doc field type
  • Loading branch information
rkspx committed Mar 11, 2022
commit d65a8efa491252db551c492572934f325d2756ab
3 changes: 1 addition & 2 deletions internal/pkg/dpluger/es6client.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ func (es *es6Client) FieldType(ctx context.Context, index string, field string)
m, err := elastic6.NewGetFieldMappingService(es.client).
Field(field).
Index(index).
Type("_doc").
Do(ctx)

if err != nil {
Expand All @@ -233,7 +232,7 @@ func (es *es6Client) FieldType(ctx context.Context, index string, field string)
var fiedMapping map[string]interface{}
var ok bool
for _, v := range m {
fm, exist := v.(map[string]interface{})["mappings"].(map[string]interface{})["_doc"].(map[string]interface{})[field]
fm, exist := v.(map[string]interface{})["mappings"].(map[string]interface{})[field]
if !exist {
continue
}
Expand Down