2

I have mappings:

"mappings": {
  "productsearchmodel": {
    "properties": {
      "id": {
        "type": "integer"
      },
      "properties": {
        "properties": {
          "invariant": {
            "properties": {
              "Name": {
                "analyzer": "Replace",
                "boost": 40,
                "type": "string"
              },
              "Description": {
                "analyzer": "Replace",
                "boost": 40,
                "type": "string"
              }
            },
            "type": "nested"
          },
        },
        "type": "nested"
      }
    }
  }

my query is:

{
  "query": {
    "bool": {
      "should": [
        {
          "nested": {
            "path": "properties.invariant",
            "query": {
              "query_string": {
                "query": "Bal",
                "fields": [
                  "Description"
                ]
              }
            }
          }
        }
      ]
    }
  }
}

but result is:

{
"took": 5,
"timed_out": false,
"_shards": {
"total": 2,
"successful": 1,
"failed": 1,
"failures": [
{
"index": "pagesearchmodel",
"shard": 0,
"status": 400,
"reason": "RemoteTransportException[[Powerpax][inet[/192.168.0.57:9300]][indices:data/read/search[phase/query]]]; nested: SearchParseException[[pagesearchmodel][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"bool":{"should":[{"nested":{"path":"properties.invariant","query":{"query_string":{"query":"Bal","fields":["Description"]}}}}]}}}]]]; nested: QueryParsingException[[pagesearchmodel] [nested] failed to find nested object under path [properties.invariant]]; "
}
]
},
"hits": {
"total": 0,
"max_score": null,
"hits": [ ]
}
}
2

1 Answer 1

2

I didn't specify an index in my request url and search tried to perfom on all indexex which have different structures.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.