mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-16 19:21:10 +00:00
Make copy of ES6 settings before setting max_ngram_diff (#5625)
This commit is contained in:
parent
ddbbaea288
commit
fe9fcd5128
1 changed files with 4 additions and 3 deletions
|
|
@ -1,3 +1,5 @@
|
|||
from copy import deepcopy
|
||||
|
||||
from elasticsearch import NotFoundError
|
||||
from elasticsearch.helpers import bulk
|
||||
|
||||
|
|
@ -90,9 +92,8 @@ class Elasticsearch7SearchBackend(Elasticsearch6SearchBackend):
|
|||
autocomplete_query_compiler_class = Elasticsearch7AutocompleteQueryCompiler
|
||||
results_class = Elasticsearch7SearchResults
|
||||
|
||||
def __init__(self, params):
|
||||
self.settings["settings"]["index"] = {"max_ngram_diff": 12}
|
||||
super().__init__(params)
|
||||
settings = deepcopy(Elasticsearch6SearchBackend.settings)
|
||||
settings["settings"]["index"] = {"max_ngram_diff": 12}
|
||||
|
||||
|
||||
SearchBackend = Elasticsearch7SearchBackend
|
||||
|
|
|
|||
Loading…
Reference in a new issue