Field of nested type displayed as unindexed

Hello
I have created following index

PUT my-index-000001
{
  "mappings": {
    "properties": {
      "users": {
        "type": "nested" 
      }
    }
  }
}

PUT my-index-000001/_doc/1
{
  "group" : "fans",
  "users" : [
    {
      "first" : "John",
      "last" :  "Smith"
    },
    {
     "first" : "Alice",
      "last" :  "White"
    }
  ]
}

In Discover tab I see information that this field is unindexed

kibana question

However this query works fine

GET my-index-000001/_search
{
  "query": {
    "nested": {
      "path": "users",
      "query": {
        "bool": {
          "must": [
            { "match": { "users.first": "John" }},
            { "match": { "users.last":  "Smith" }} 
          ]
        }
      }
    }
  }
}

Why this unindexed alert occured?

Hello Tomasz!

What version of elastic stack are you using? I think some of the older versions of the stack did not have support for searching through nested fields, since they're a little complicated and special KQL syntax is required to use them. Recent versions do have some support though; see this doc for support in 7.13 - Kibana Query Language | Kibana Guide [7.13] | Elastic

It would also be good to see the mappings for that index, after you added the nested field. To make sure it didn't become non-indexed for some reason (from a parent field mapping, or index template or similar).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.