freestroke | Freestroke is an implementation of the OverCoat http
kandi X-RAY | freestroke Summary
kandi X-RAY | freestroke Summary
3D painting tool
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of freestroke
freestroke Key Features
freestroke Examples and Code Snippets
Community Discussions
Trending Discussions on freestroke
QUESTION
I'm storing swimming competitions results in elasticsearch to be able to analyse and present data in different ways. Each result is stored as a separate document, time in millis. Like this:
...ANSWER
Answered 2019-May-09 at 11:21The query returns any document that is matching a single or more should clauses. You are creating a bucket containing all documents of a single swimmer, then you are dividing those documents per stroke type. Because your initial query result contains all documents matching any award you will end up with the result you described. There are multiple approaches to handle this.
You do a seperate query for every award, containing the filter query in a must clause. This ensures only documents matching the award filter are selected.
You change your query to select all document e.g. do a match all. Then you handle your logic in the aggregations. You keep the terms aggregation on swimmer to get all documents matching a single swimmer in one bucket. Then you do nested filter aggregations on the swimmer level for every award, if they contain any documents the swimmer has completed the award.
Example for 2:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install freestroke
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page