PUT test_index

{

"mappings": {

  "product": {

     "properties": {

        "description": {

           "type": "string"

        },

        "tags": {

           "type": "string"

        },

        "title": {

           "type": "string"

        },

        "tag\_suggest": {

           "type": "completion",

           "index\_analyzer": "simple",

           "search\_analyzer": "simple",

           "payloads": false

        }

     }

  }

}

}

GET autocomplete_test/_analyze?text=Ouderkerk+aan+de+Amstel&analyzer=autocomplete_analyzer&pretty=True

POST autocomplete_test/city { "city" : "Amsterdam" }

POST autocomplete_test/city { "city" : "Amstelveen" }

POST autocomplete_test/city { "city" : "Ouderkerk aan de Amstel" }

POST autocomplete_test/city { "city" : "Alphen aan den Rijn" }

POST autocomplete_test/city { "city" : "Den Haag" }

POST autocomplete_test/city { "city" : "Rotterdam" }

POST autocomplete_test/city { "city" : "Groningen" }

POST autocomplete_test/city { "city" : "Castelré" }

POST autocomplete_test/city { "city" : "Etten-Leur" }

POST autocomplete_test/city { "city" : "Babyloniënbroek" }

POST autocomplete_test/_refresh

GET http://localhost:9200/autocomplete\_test/\_search?q=city:Ams&pretty=True

results matching ""

    No results matching ""