Elasticsearch - Index word, bigram and trigram -
I am trying to index some phrases like this:
" Elastic search is a great search engine "
like indexed
elastic search terms are # words # words great # word engine # words elastic search # bi -Gram is # bi-gram A great # bi-gramin great search # bi-gramin search engine # Bi-Gram Flexilizer is a # tri-gram, a great # tri-gram is a great discovery # tri-gram I search engine # tri-gram
I know how the index word (with the default indexer) and the large ram and trigemrand (with the N-Gram indexer) index, but both of them Not at the same time
How can I do this?
Regards
You will use it. Here's an example I made -
{"settings": {"number_of_shards": 5, "number_of_replicas": 0, "analysis": {"filter": {"option "Type": "synonyms", "synonyms_pad": "synonym.txt"}, "my_metaphone": {"type": "phonetic", "encoder": "metaphone", "substituted": incorrect}} , "Analyzer": {"TokenIcezer": "White location", "Filters": ["lowercase", "synonyms"]}, "metafone": {"tokenizer": "standard", "filter" "" "" "" "" "" _all ": {" enabled ": wrong}," property ": {" data field "{" Type ":" String "," Analyzer ":" Simple "}," Metafone ":" Multi "field, : "String", "string": "string", "paste": {"type": "string", "analyzer": "porter"}, "synonym": "string", "analyzer ":" Metaphon "," Analyzer ":" Synonym "}}}}}}}
Then you can specify which field you want to search against, i.e. < Code> datafield.synonym or your mother In the datafield.bigram
. Then you can build your query, encourage the field, which is most important for your results.
Comments
Post a Comment