Created
June 19, 2017 12:12
-
-
Save selcukusta/a42ede9cee2cf6d778fb058e11eba41c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X PUT \ | |
| http://localhost:9200/medium_sample_index \ | |
| -H 'cache-control: no-cache' \ | |
| -H 'content-type: application/json' \ | |
| -d '{ | |
| "settings": { | |
| "number_of_shards": 1, | |
| "number_of_replicas": 0, | |
| "analysis": { | |
| "filter": { | |
| "synonym": { | |
| "type": "synonym", | |
| "synonyms_path": "synonyms/source.txt", | |
| "ignore_case": true | |
| }, | |
| "ngram": { | |
| "type": "nGram", | |
| "min_gram": 1, | |
| "max_gram": 20 | |
| } | |
| }, | |
| "analyzer": { | |
| "index": { | |
| "filter": [ | |
| "ngram", | |
| "synonym", | |
| "lowercase", | |
| "asciifolding", | |
| "word_delimiter" | |
| ], | |
| "char_filter": [ | |
| "html_strip" | |
| ], | |
| "tokenizer": "standard" | |
| }, | |
| "search": { | |
| "filter": [ | |
| "synonym", | |
| "lowercase", | |
| "asciifolding", | |
| "word_delimiter" | |
| ], | |
| "char_filter": [ | |
| "html_strip" | |
| ], | |
| "tokenizer": "standard" | |
| } | |
| } | |
| } | |
| }, | |
| "mappings": { | |
| "sample_type": { | |
| "properties": { | |
| "title": { | |
| "type": "text", | |
| "analyzer": "index", | |
| "search_analyzer": "search" | |
| } | |
| } | |
| } | |
| } | |
| }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment