Skip to content

illegal_state_exception #2526

@gwired2015

Description

@gwired2015

NEST/Elasticsearch.Net version: 5.0
Elasticsearch version: 5.0

Description of the problem including expected versus actual behavior:
Attempting to run:
ElasticsearchResponse searchResponse = ElasticSearchClient.Search(elasticSearchIndex, (object)search, null);

returns:
{"error":{"root_cause":[{"type":"illegal_state_exception","reason":"Can't get text on a START_OBJECT at 1:36"}],"type":"illegal_state_exception","reason":"Can't get text on a START_OBJECT at 1:36"},"status":500}

Steps to reproduce:

  1. Execute the following Query:
{
   "query":{
      "multi_match":{
         "fields":[
            {
               "field":"Field1^5"
            },
            {
               "field":"Field2^20"
            },
            {
               "field":"*Field1^5"
            },
            {
               "field":"Field3^5"
            },
            {
               "field":"Field4^5"
            },
            {
               "field":"Field5^5"
            },
            {
               "field":"Field6^8"
            },
            {
               "field":"Field7^5"
            },
            {
               "field":"Field8^10"
            },
            {
               "field":"_all"
            }
         ],
         "query":"test",
         "type":"phrase",
         "use_dis_max":"true"
      }
   },
   "from":0,
   "size":0,
   "aggs":{
      "top_types":{
         "terms":{
            "field":"_type"
         },
         "aggs":{
            "top_type_hits":{
               "top_hits":{
                  "size":25,
                  "fields":[]
               }
            }
         }
      }
   }
}
  1. Result
    {"error":{"root_cause":[{"type":"illegal_state_exception","reason":"Can't get text on a START_OBJECT at 1:36"}],"type":"illegal_state_exception","reason":"Can't get text on a START_OBJECT at 1:36"},"status":500}

  2. Standard result set with 1 entry per type and list of all fields.

Functions in 2.4.1 - Query Runs in Sense either Post or Get.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions