Completion suggester - input as mapping


(Jack Tuck) #1

In the docs, there is an example:

PUT music
{
    "mappings": {
        "song" : {
            "properties" : {
                "suggest" : {
                    "type" : "completion"
                },
                "title" : {
                    "type": "keyword"
                }
            }
        }
    }
}
PUT music/song/1?refresh
{
    "suggest" : {
        "input": [ "Nevermind", "Nirvana" ],
        "weight" : 34
    }
}

Is it possible to skip this second step by having input put in the mapping as a path (e.g. to title)?
What would that look like?


(system) #2

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