文档:https://www.meilisearch.com/docs/reference/api/settings
使用参数 stopWords
指定不参与搜索的词
client.index('movies').update_settings({
'rankingRules': [
'words',
'typo',
'proximity',
'attribute',
'sort',
'exactness',
'release_date:desc',
'rank:desc'
],
'distinctAttribute': 'movie_id',
'searchableAttributes': [
'title',
'overview',
'genres'
],
'displayedAttributes': [
'title',
'overview',
'genres',
'release_date'
],
'sortableAttributes': [
'title',
'release_date'
],
'stopWords': [
'the',
'a',
'an'
],
'synonyms': {
'wolverine': ['xmen', 'logan'],
'logan': ['wolverine']
},
'typoTolerance': {
'minWordSizeForTypos': {
'oneTypo': 8,
'twoTypos': 10
},
'disableOnAttributes': ['title']
},
'pagination': {
'maxTotalHits': 5000
},
'faceting': {
'maxValuesPerFacet': 200
},
'searchCutoffMs': 150
})