Term Vectors in Nested Documents


#1

Hi I am not able to get the term vectors to work with nested documents. Not sure if my Mapping is right. Pls find the mapping below.

I get an error - No handler found for uri [/test-vector/doc/1/_termvectors?pretty=true] and method [GET], when i issue - GET test-vector/doc/1/_termvectors?pretty=true

PUT /_template/template_vector_test
{
    "template":"test-vector",
    "settings": 
    {
		"analysis": 
		{
			"tokenizer": 
			{
				"ngram_tokenizer": 
				{
					"type": "nGram",
					"min_gram": 3,
					"max_gram": 8
				}
			},
			"analyzer": 
			{
				"ngram_tokenizer_analyzer": 
				{
					"type": "custom",
					"tokenizer": "ngram_tokenizer",
					"filter": ["lowercase"]
				}
			}
		}
   },
   "mappings": 
    {
	    "doc": 
        {
            "dynamic":"false",
            "_timestamp":{"enabled": "true","store":"true","format":"YYYY-MM-DD HH:mm:ss.SSS","default":"now"},
            "properties":
            {
				"book":
				{
					"type":"object",
					"properties":
					{
						"details":
						{
							"type":"object",
							"properties":
							{
								"comment":
								{
									"type":"string",
									"term_vector":"yes",
									"analyzer": "ngram_tokenizer_analyzer"
								}
							}
						}
					}
				}
            }    
        }
    }
}

Thanks
Shankar


#2

Duh!! there was a typo in the term vector command. I got this to work!


(system) #3