Last active
December 17, 2015 01:49
-
-
Save arjitgupta/5530830 to your computer and use it in GitHub Desktop.
Analyzer used to approx search and query
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
{ | |
"index" : { | |
"analysis" : { | |
"analyzer" : { | |
"my_analyzer" : { | |
"tokenizer" : "standard", | |
"filter" : ["standard", "lowercase", "my_metaphone","ourEnglishFilter","mynGram"] | |
}, | |
"simple_analyzer" : { | |
"tokenizer": "my_pattern_tokenizer", | |
"filter" : "lowercase" | |
} | |
}, | |
"filter" : { | |
"my_metaphone" : { | |
"type" : "phonetic", | |
"encoder" : "metaphone", | |
"replace" : false | |
}, | |
"ourEnglishFilter" :{ | |
"type": "kstem" | |
}, | |
"mynGram" : { | |
"type" : "nGram", | |
"min_gram" : 2, | |
"max_gram" : 8 | |
} | |
} | |
} | |
} | |
} | |
{ | |
"query" : { | |
"bool" : { | |
"must" : { | |
"flt_field" : { | |
"title" : { | |
"like_text" : "the beautiful book", | |
"min_similarity" : 0.5 | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment