I have a problem with Java API and aggregations result

Serializer (jackson) produce this error:

No serializer found for class org.elasticsearch.common.text.StringText and 
no properties discovered to create BeanSerializer


for this query :


   1. {
   2.     "size": 0,
   3.     "aggregations": {
   4.         "agg": {
   5.             "global": {},
   6.             "aggregations": {
   7.                 "dim-1": {
   8.                     "terms": {
   9.                         "field": "field-1"
   10.                     },
   11.                     "aggregations": {
   12.                         "dim-2": {
   13.                             "terms": {
   14.                                 "field": "field-2"
   15.                             },
   16.                             "aggregations": {
   17.                                 "myStats": {
   18.                                     "stats": {
   19.                                         "field": "statsField"
   20.                                     }
   21.                                 }
   22.                             }
   23.                         }
   24.                     }
   25.                 }
   26.             }
   27.         }
   28.     }
   29. }
   


with this response :


   1. {
   2.    "took":15932,
   3.    "timed_out":false,
   4.    "_shards":{
   5.       "total":2,
   6.       "successful":2,
   7.       "failed":0
   8.    },
   9.    "hits":{
   10.       "total":38376901,
   11.       "max_score":0,
   12.       "hits":[
   13.  
   14.       ]
   15.    },
   16.    "aggregations":{
   17.       "agg":{
   18.          "doc_count":38376901,
   19.          "dim-1":{
   20.             "buckets":[
   21.                {
   22.                   "key":27380,
   23.                   "doc_count":311352,
   24.                   "dim-2":{
   25.                      "buckets":[
   26.                         {
   27.                            "key":1,
   28.                            "doc_count":275581,
   29.                            "statsField":{
   30.                               "count":275581,
   31.                               "min":245,
   32.                               "max":1295001,
   33.                               "avg":111170.57729999075,
   34.                               "sum":30636498862.908752
   35.                            }
   36.                         },
   37.                         {
   38.                            "key":2,
   39.                            "doc_count":35771,
   40.                            "statsField":{
   41.                               "count":35771,
   42.                               "min":300,
   43.                               "max":2070000,
   44.                               "avg":288086.52814757434,
   45.                               "sum":10305143198.366882
   46.                            }
   47.                         }
   48.                      ]
   49.                   }
   50.                },
   51.                {
   52.                   "key":1595,
   53.                   "doc_count":269090,
   54.                   "dim-2":{
   55.                      "buckets":[
   56.                         {
   57.                            "key":1,
   58.                            "doc_count":221705,
   59.                            "statsField":{
   60.                               "count":221705,
   61.                               "min":180,
   62.                               "max":3450000,
   63.                               "avg":69082.0294308078,
   64.                               "sum":15315831334.957245
   65.                            }
   66.                         },
   67.                         {
   68.                            "key":2,
   69.                            "doc_count":47385,
   70.                            "statsField":{
   71.                               "count":47385,
   72.                               "min":250,
   73.                               "max":6000000,
   74.                               "avg":298778.0619758563,
   75.                               "sum":14157598466.725952
   76.                            }
   77.                         }
   78.                      ]
   79.                   }
   80.                }
   81.             ]
   82.          }
   83.       }
   84.    }
   85. }
   

How can I successfully serialize aggregations result ?

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/61d79a3a-6fcd-458a-8e24-76e25ac4810d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to