filter - Nested Aggregation Elasticsearch -


i'm trying build nested aggregation in elasticsearch keeps giving errors. says "cannot find agg type tags". how can fix it. thank helps.btw don't have nested documents have 1 document having 180 fields. can apply aggregation? here code:

{   "aggs": {      "comments": {        "nested": {         "path": "comments"       },      "aggs" : {     "red_products": {       "filter": {         "not": {           "terms": {             "text": [               "06melihgokcek",               "t.co","??","????","???"             ]           }         }       },       "aggs": {         "top_docs": {           "terms": {             "field": "text",             "size": 50           }         },        "aggs" : {             "tags" : {             "terms" : {                 "field" : "text",                 "include" : ".*avni.*",                 "exclude" : "fuat_.*"             }         }     }       }       }   } }}} 

your innermost aggs (the 1 called tags @ bottom) misplaced , should child element of top_docs.

{   "aggs": {     "comments": {       "nested": {         "path": "comments"       },       "aggs": {         "red_products": {           "filter": {             "not": {               "terms": {                 "text": [                   "06melihgokcek",                   "t.co",                   "??",                   "????",                   "???"                 ]               }             }           },           "aggs": {             "top_docs": {               "terms": {                 "field": "text",                 "size": 50               },               "aggs": {                   <---- misplaced aggs                 "tags": {                   "terms": {                     "field": "text",                     "include": ".*avni.*",                     "exclude": "fuat_.*"                   }                 }               }             }           }         }       }     }   } } 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -