mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-26 07:43:44 +00:00
Revert "Elasticsearch: Replaced usage of index_analyzer (#2568)"
This reverts commit d14150eb43.
This commit is contained in:
parent
0714cddd54
commit
15ef4fcca7
2 changed files with 10 additions and 11 deletions
|
|
@ -62,8 +62,7 @@ class ElasticSearchMapping(object):
|
|||
mapping['boost'] = field.boost
|
||||
|
||||
if field.partial_match:
|
||||
mapping['analyzer'] = 'edgengram_analyzer'
|
||||
mapping['search_analyzer'] = 'standard'
|
||||
mapping['index_analyzer'] = 'edgengram_analyzer'
|
||||
|
||||
mapping['include_in_all'] = True
|
||||
|
||||
|
|
@ -82,7 +81,7 @@ class ElasticSearchMapping(object):
|
|||
fields = {
|
||||
'pk': dict(type='string', index='not_analyzed', store='yes', include_in_all=False),
|
||||
'content_type': dict(type='string', index='not_analyzed', include_in_all=False),
|
||||
'_partials': dict(type='string', analyzer='edgengram_analyzer', search_analyzer='standard', include_in_all=False),
|
||||
'_partials': dict(type='string', index_analyzer='edgengram_analyzer', include_in_all=False),
|
||||
}
|
||||
|
||||
fields.update(dict(
|
||||
|
|
|
|||
|
|
@ -755,17 +755,17 @@ class TestElasticSearchMapping(TestCase):
|
|||
'properties': {
|
||||
'pk': {'index': 'not_analyzed', 'type': 'string', 'store': 'yes', 'include_in_all': False},
|
||||
'content_type': {'index': 'not_analyzed', 'type': 'string', 'include_in_all': False},
|
||||
'_partials': {'analyzer': 'edgengram_analyzer', 'search_analyzer': 'standard', 'include_in_all': False, 'type': 'string'},
|
||||
'_partials': {'index_analyzer': 'edgengram_analyzer', 'include_in_all': False, 'type': 'string'},
|
||||
'live_filter': {'index': 'not_analyzed', 'type': 'boolean', 'include_in_all': False},
|
||||
'published_date_filter': {'index': 'not_analyzed', 'type': 'date', 'include_in_all': False},
|
||||
'title': {'type': 'string', 'include_in_all': True, 'analyzer': 'edgengram_analyzer', 'search_analyzer': 'standard'},
|
||||
'title': {'type': 'string', 'include_in_all': True, 'index_analyzer': 'edgengram_analyzer'},
|
||||
'title_filter': {'index': 'not_analyzed', 'type': 'string', 'include_in_all': False},
|
||||
'content': {'type': 'string', 'include_in_all': True},
|
||||
'callable_indexed_field': {'type': 'string', 'include_in_all': True},
|
||||
'tags': {
|
||||
'type': 'nested',
|
||||
'properties': {
|
||||
'name': {'type': 'string', 'include_in_all': True, 'analyzer': 'edgengram_analyzer', 'search_analyzer': 'standard'},
|
||||
'name': {'type': 'string', 'include_in_all': True, 'index_analyzer': 'edgengram_analyzer'},
|
||||
'slug_filter': {'index': 'not_analyzed', 'type': 'string', 'include_in_all': False},
|
||||
}
|
||||
},
|
||||
|
|
@ -837,11 +837,11 @@ class TestElasticSearchMappingInheritance(TestCase):
|
|||
'properties': {
|
||||
# New
|
||||
'extra_content': {'type': 'string', 'include_in_all': True},
|
||||
'subtitle': {'type': 'string', 'include_in_all': True, 'analyzer': 'edgengram_analyzer', 'search_analyzer': 'standard'},
|
||||
'subtitle': {'type': 'string', 'include_in_all': True, 'index_analyzer': 'edgengram_analyzer'},
|
||||
'page': {
|
||||
'type': 'nested',
|
||||
'properties': {
|
||||
'title': {'type': 'string', 'include_in_all': True, 'analyzer': 'edgengram_analyzer', 'search_analyzer': 'standard'},
|
||||
'title': {'type': 'string', 'include_in_all': True, 'index_analyzer': 'edgengram_analyzer'},
|
||||
'search_description': {'type': 'string', 'include_in_all': True},
|
||||
'live_filter': {'index': 'not_analyzed', 'type': 'boolean', 'include_in_all': False},
|
||||
}
|
||||
|
|
@ -850,17 +850,17 @@ class TestElasticSearchMappingInheritance(TestCase):
|
|||
# Inherited
|
||||
'pk': {'index': 'not_analyzed', 'type': 'string', 'store': 'yes', 'include_in_all': False},
|
||||
'content_type': {'index': 'not_analyzed', 'type': 'string', 'include_in_all': False},
|
||||
'_partials': {'analyzer': 'edgengram_analyzer', 'search_analyzer': 'standard', 'include_in_all': False, 'type': 'string'},
|
||||
'_partials': {'index_analyzer': 'edgengram_analyzer', 'include_in_all': False, 'type': 'string'},
|
||||
'live_filter': {'index': 'not_analyzed', 'type': 'boolean', 'include_in_all': False},
|
||||
'published_date_filter': {'index': 'not_analyzed', 'type': 'date', 'include_in_all': False},
|
||||
'title': {'type': 'string', 'include_in_all': True, 'analyzer': 'edgengram_analyzer', 'search_analyzer': 'standard'},
|
||||
'title': {'type': 'string', 'include_in_all': True, 'index_analyzer': 'edgengram_analyzer'},
|
||||
'title_filter': {'index': 'not_analyzed', 'type': 'string', 'include_in_all': False},
|
||||
'content': {'type': 'string', 'include_in_all': True},
|
||||
'callable_indexed_field': {'type': 'string', 'include_in_all': True},
|
||||
'tags': {
|
||||
'type': 'nested',
|
||||
'properties': {
|
||||
'name': {'type': 'string', 'include_in_all': True, 'analyzer': 'edgengram_analyzer', 'search_analyzer': 'standard'},
|
||||
'name': {'type': 'string', 'include_in_all': True, 'index_analyzer': 'edgengram_analyzer'},
|
||||
'slug_filter': {'index': 'not_analyzed', 'type': 'string', 'include_in_all': False},
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue