I am trying to add autocomplete to my search index.
I am struggling to trying to get the syntax correct.
I have search and found solutions to similar solutions but still can't seem 
to get my syntax to work.
Please tell me what is wrong....

PUT /my_index
{
   "settings": {
      "analysis": {
         "filter": {
            "autocomplete_filter": {
               "type": "edgeNGram",
               "min_gram": 2,
               "max_gram": 20,
               "token_chars": [
                  "letter",
                  "digit"
               ]
            }
         },
         "analyzer": {
            "my_standard_analyzer": {
               "type": "standard",
               "stopwords": []
            },
            "autocomplete": {
               "title": {
                  "type": "custom",
                  "tokenizer": "standard",
                  "filter": [
                     "lowercase",
                     "autocomplete_filter"
                  ]
               }
            }
         }
      }
   },
   "mappings": {
      "title": {
         "properties": {
            "title": {
               "type": "multi_field",
               "fields": {
                  "title": {
                     "type": "string",
                     "analyzer": "title"
                  },
                  "autocomplete": {
                     "type": "string",
                     "index_analyzer": "autocomplete",
                     "search_analyzer": "title"
                  }
               }
            }
         }
      }
   }
}


-- 
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/30b02d2d-bc0e-4774-9057-3a2ed10abb3d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to