ElasticSearch multilayer nested properties

I have an index mapping like this

"mappings": {
      "properties": {
        "filter": {
          "type": "nested",
          "properties": {
            "Hersteller": {
              "type": "nested",
              "properties": {
                "id": {
                  "type": "text",
                  "analyzer": "analyzerFilter",
                  "fielddata": true
                },
                "value": {
                  "type": "text",
                  "analyzer": "analyzerFilter",
                  "fielddata": true
                }
              }
            },
            "Modell": {
              "type": "nested",
              "properties": {
                "id": {
                  "type": "text",
                  "analyzer": "analyzerFilter",
                  "fielddata": true
                },
                "value": {
                  "type": "text",
                  "analyzer": "analyzerFilter",
                  "fielddata": true
                }
              }
            }
          }
        },
        "id": {
          "type": "text",
          "analyzer": "analyzerFilter"
        }
      }
    }
  }

There are 2 nested layers filter.Modell. I need a query to get all unique filter.Modell.value where filter.Hersteller.value is equal some predefined value.

Thanks in advance



from Recent Questions - Stack Overflow https://ift.tt/FlGaMht
https://ift.tt/O5oIAD6

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation