Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "mappings": {
- "products": {
- "_all": {
- "enabled": true
- },
- "properties": {
- "title": {
- "type": "string"
- },
- "categories": {
- "type":"nested",
- "properties": {
- "type": {
- "type": "string",
- "index": "not_analyzed"
- },
- "name": {
- "type": "string",
- "index": "not_analyzed"
- }
- }
- }
- }
- }
- }
- {
- "query":{
- "multi_match": {
- "query": "Sound",
- "fields": [
- "title"
- ]
- }
- },
- "aggs":{
- "Applications": {
- "nested": {
- "path": "categories"
- },
- "aggs": {
- "meta": {
- "terms": {
- "field": "categories.type"
- },
- "aggs": {
- "name": {
- "terms": {
- "field": "categories.name"
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement