this is my ES5 index settings :
dev: {
settings: {
index: {
number_of_shards: "5",
provided_name: "dev",
creation_date: "1491735064046",
analysis: {
filter: {
trigrams_filter: {
type: "ngram",
min_gram: "3",
max_gram: "3"
}
},
analyzer: {
trigrams: {
filter: [
"lowercase",
"trigrams_filter"
],
type: "custom",
tokenizer: "standard"
}
}
},
number_of_replicas: "1",
uuid: "2dcgz81ET0GRFa-EEwsUhA",
version: {
created: "5020299"
}
}
}
},
this query would give 1 result as expected:
{'from': 0,
'query': {'bool': {'filter': [{'term': {'public': True}}],
'must': [{'multi_match': {'fields': ['author_name',
'title^5',
'title_ngram',
'title.ngram',
'title.stemmed',
'text^3',
'text.stemmed',
'keywords',
'keywords.stemmed',
'categories',
'categories.stemmed'],
'fuzziness': 'AUTO',
'query': u'austrailia'}}]}},
'size': 20}
because there is a article with title australia
.
however this query for aust
would not give any result:
{'from': 0,
'query': {'bool': {'filter': [{'term': {'public': True}}],
'must': [{'multi_match': {'fields': ['author_name',
'title^5',
'title_ngram',
'title.ngram',
'title.stemmed',
'text^3',
'text.stemmed',
'keywords',
'keywords.stemmed',
'categories',
'categories.stemmed'],
'fuzziness': 'AUTO',
'query': u'austrailia'}}]}},
'size': 20}
I've read through all the ES5 documentation but still can't get this to work.