Last active
June 7, 2020 15:12
-
-
Save bhavsarpratik/aaaa9ca91a5b75b550a70ca4336d73e1 to your computer and use it in GitHub Desktop.
This file contains 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
PUT /test_index | |
{ | |
"mappings": { | |
"properties": { | |
"title": { | |
"type": "text", | |
"analyzer": "synonym_analyzer", | |
"search_analyzer": "synonym_analyzer" | |
} | |
} | |
}, | |
"settings": { | |
"index": { | |
"analysis": { | |
"analyzer": { | |
"synonym_analyzer": { | |
"tokenizer": "standard", | |
"filter": ["my_stop", "synonym"] | |
} | |
}, | |
"filter": { | |
"my_stop": { | |
"type": "stop", | |
"stopwords": ["the"] | |
}, | |
"synonym": { | |
"type": "synonym", | |
"lenient": true, | |
"synonyms": ["pussy => cat"] | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment