@@ -438,8 +438,10 @@ def test_build_schema(self):
438438
439439 (content_field_name , mapping ) = self .sb .build_schema (old_ui .all_searchfields ())
440440 self .assertEqual (content_field_name , 'text' )
441- self .assertEqual (len (mapping ), 4 )
441+ self .assertEqual (len (mapping ), 4 + 2 ) # +2 management fields
442442 self .assertEqual (mapping , {
443+ 'django_id' : {'index' : 'not_analyzed' , 'type' : 'string' , 'include_in_all' : False },
444+ 'django_ct' : {'index' : 'not_analyzed' , 'type' : 'string' , 'include_in_all' : False },
443445 'text' : {'type' : 'string' , 'analyzer' : 'snowball' },
444446 'pub_date' : {'type' : 'date' },
445447 'name' : {'type' : 'string' , 'analyzer' : 'snowball' },
@@ -450,8 +452,10 @@ def test_build_schema(self):
450452 ui .build (indexes = [ElasticsearchComplexFacetsMockSearchIndex ()])
451453 (content_field_name , mapping ) = self .sb .build_schema (ui .all_searchfields ())
452454 self .assertEqual (content_field_name , 'text' )
453- self .assertEqual (len (mapping ), 15 )
455+ self .assertEqual (len (mapping ), 15 + 2 ) # +2 management fields
454456 self .assertEqual (mapping , {
457+ 'django_id' : {'index' : 'not_analyzed' , 'type' : 'string' , 'include_in_all' : False },
458+ 'django_ct' : {'index' : 'not_analyzed' , 'type' : 'string' , 'include_in_all' : False },
455459 'name' : {'type' : 'string' , 'analyzer' : 'snowball' },
456460 'is_active_exact' : {'type' : 'boolean' },
457461 'created' : {'type' : 'date' },
@@ -1068,6 +1072,8 @@ def test_build_schema(self):
10681072 self .sb = connections ['default' ].get_backend ()
10691073 content_name , mapping = self .sb .build_schema (self .ui .all_searchfields ())
10701074 self .assertEqual (mapping , {
1075+ 'django_id' : {'index' : 'not_analyzed' , 'type' : 'string' , 'include_in_all' : False },
1076+ 'django_ct' : {'index' : 'not_analyzed' , 'type' : 'string' , 'include_in_all' : False },
10711077 'name_auto' : {
10721078 'type' : 'string' ,
10731079 'analyzer' : 'edgengram_analyzer' ,
0 commit comments