Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Mapping
- "categories": {
- "type": "nested",
- "properties": {
- "id": {
- "type": "long"
- },
- "name": {
- "type": "keyword"
- }
- }
- }
- ## Search
- GET development_tasks_index/_search
- {
- "query": {
- "bool": {
- "must": {
- "match_all": {}
- }
- }
- },
- "aggs": {
- "categories": {
- "nested": {
- "path": "categories"
- }
- }
- }
- }
- ## result
- "aggregations": {
- "categories": {
- "doc_count": 4
- }
- }
- ## Expectation
- "aggregations": {
- "categories": {
- "doc_count": 4,
- "id": 11,
- "name": "Category ABC"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement