How to do Incremental/Search as you type full text search on 5 million records sets using Elastic search
You should try these settings:
curl -XPUT "http://localhost:9200/index_wiki_articlenames/" -d'{ "settings":{ "analysis":{ "tokenizer":{ "edge_ngram_tokenizer":{ "type":"edgeNGram", "min_gram":"1", "max_gram":"20", "token_chars":[ "letter", "digit" ] } }, "analyzer":{ "nGram_analyzer":{ "type":"custom", "tokenizer":"edge_ngram_tokenizer", "filter":[ "lowercase", "asciifolding" ] } } } }, "mappings":{ "name":{ "properties":{ "articlenames":{ "type":"text", "analyzer":"nGram_analyzer", "search_analyzer": "standard" } } } }}'
Also when querying try this query:
GET my_index/_search{ "query": { "match": { "articlenames": { "query": "Sachin T", "operator": "and" } } }}
I know it's too late, but anybody who's looking for a solution for this can try this query. Mapping & Index is correct. Seems to be missing and operator in query section.
GET index_wiki_articlenames/_search{ "query": { "match": { "articlenames": { "query": "sachin ten", "operator": "and" } } }}
This results in
sachin tendulkarsachin tendulkar centuries