Term vectors for nested fields

Hi everyone.
I'm trying to use the mtermvectors api to get the term vectors (with term_statistics) for an artificial document having several nested fields. I noticed however that, while for standard fields this works without issues, I can't figure out a way to get the term vectors for the nested fields in the artificial document.
To reproduce:

PUT /my-index-000001
{
  "mappings": {
    "properties": {
      "user": {
        "type": "nested",
        "properties": {
            "first" :  {
                "type": "text"
            },
            "last" :  {
                "type": "text"
            },
            "description":{
                "type": "text"
            }
        }
      }
    }
  }
}
PUT /my-index-000001/_doc/1
{
  "group" : "fans",
  "user" : [
    {
      "first" : "John",
      "last" :  "Smith",
      "description":"first description"
    },
    {
      "first" : "Alice",
      "last" :  "White",      
      "description":"second description"
    }
  ]
}

finally, to get the term vector for the artificial document

GET my-index-000001/_mtermvectors
{ 
   "docs": [ 
    { 
        "doc" : {
            "group":"test",
            "user" : [
                {
                "first" : "John",
                "last" :  "Smith",
                "description":"artificial description"
                }
            ]
        }, 
        "fields": ["*"], 
        "term_statistics":true,
        "positions":false,
        "offsets":false
    }
   ]
}

produces the response

{
    "docs": [
        {
            "_index": "my-index-000001",
            "_type": "_doc",
            "_version": 0,
            "found": true,
            "took": 0,
            "term_vectors": {
                "group": {
                    "field_statistics": {
                        "sum_doc_freq": 1,
                        "doc_count": 1,
                        "sum_ttf": 1
                    },
                    "terms": {
                        "test": {
                            "term_freq": 1
                        }
                    }
                }
            }
        }
    ]
}

which is missing the term vectors for the nested fields.

Is this a bug or am I missing something in the query/mapping?

Has anyone ever dealt with this issue?

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