-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Implement GeoShape query #956
base: release-branch.v6
Are you sure you want to change the base?
Implement GeoShape query #956
Conversation
Thank you very much for working on this! When I add new queries, I typically use the Java source as a basis. It often has more fields than documented at the official manual. E.g. |
Sure, I'll do it soon! |
I was toying around a bit with this, but I'm still not happy with the outcome. I'm experimenting a bit with different |
What is the status of this PR? I really need GeoShape support :/ |
@timonmasberg Creating all the different builders is a lot of work. It has been mentioned in several issues how one can do that. I'm struggling with time to do it for a while now. The workaround is to build the query yourself. You can e.g. always use q := elastic.NewRawStringQuery(`{
"geo_shape": {
"location": {
"shape": {
"type": "envelope",
"coordinates": [ [ 13.0, 53.0 ], [ 14.0, 52.0 ] ]
},
"relation": "within"
}
}`)
res, err := client.Search().
Index("YOUR_INDEX_NAME").
Query(q).
Do(ctx)
... ... or build your own |
Okay, thank you! |
No description provided.