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

[terms] doesn't support values of type: map[string]interface {} #7

Open
ickeep opened this issue Jul 15, 2023 · 3 comments
Open

[terms] doesn't support values of type: map[string]interface {} #7

ickeep opened this issue Jul 15, 2023 · 3 comments

Comments

@ickeep
Copy link

ickeep commented Jul 15, 2023

How to use trem query,
The format required in the sdk is
map[string]map[string]interface{}

// SetTerms gets a reference to the given map[string]map[string]interface{} and assigns it to the Terms field. func (o *MetaQuery) SetTerms(v map[string]map[string]interface{}) { o.Terms = &v }
report error
reason: [terms] doesn't support values of type: map[string]interface {}"}

Check out the zincsearch code
https://github.com/zincsearch/zincsearch/blob/main/pkg/uquery/query/terms.go
The required format is
query map[string]interface{}

how to use ?

@hengfeiyang
Copy link
Collaborator

Suggest use https://github.com/elastic/go-elasticsearch v7, this SDK is not good. Thanks

@ickeep
Copy link
Author

ickeep commented Jul 31, 2023

See that the latest version is 8.9.0.
Is it also available

Suggest use https://github.com/elastic/go-elasticsearch v7, this SDK is not good. Thanks

@feiyangbeyond
Copy link

Did your SetTerms work?

How to use SetTerms?

This sdk has no examples of related functions.

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

No branches or pull requests

3 participants