I am learning the elasticsearch, and I want to run the example of context 
suggester following the 
doc: 
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/suggester-context.html

But I always get the error when I create the mapping, 

error: {"error":"MapperParsingException[Unknown field 
[context]]","status":400}

my dsl:
curl -X PUT localhost:9200/sale
curl -X PUT "localhost:9200/sale/product/_mapping" -d '
{
    "product": {
        "properties": {
            "name": {
                "type" : "string"
            },
            "tag": {
                "type" : "string"
            },"colorField": {"type":"string" }, 
            "suggest": {
                "type": "completion",
                "context": {
                    "color": { 
                        "type": "category",
                        "path": "colorField",
                        "default": ["red", "green", "blue"]
                    },
                    "location": { 
                        "type": "geo",
                        "precision": "5m",
                        "neighbors": true,
                        "default": "u33"
                    }
                }
            }
        }
    }
}'

does any one know the reason?

thanks
Johnson

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/d6a1b427-08ab-41a3-88f5-74d563bc6946%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to