Skip to content

Commit 0b227cb

Browse files
fix mappings
1 parent ad837a3 commit 0b227cb

File tree

1 file changed

+8
-7
lines changed
  • examples/simple/search_indexes/documents

1 file changed

+8
-7
lines changed

examples/simple/search_indexes/documents/address.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ class AddressDocument(DocType):
106106
analyzer=html_strip,
107107
fields={
108108
'raw': KeywordField(),
109-
}
110-
)
111-
}
112-
)
113-
}
109+
},
110+
),
111+
},
112+
),
113+
},
114114
)
115115

116116
# Continent object
@@ -121,17 +121,18 @@ class AddressDocument(DocType):
121121
analyzer=html_strip,
122122
fields={
123123
'raw': KeywordField(),
124+
'suggest': fields.CompletionField(),
124125
}
125126
),
126-
'country': fields.ObjectField(
127+
'country': fields.NestedField(
127128
properties={
128129
'name': StringField(
129130
analyzer=html_strip,
130131
fields={
131132
'raw': KeywordField(),
132133
}
133134
),
134-
'city': fields.ObjectField(
135+
'city': fields.NestedField(
135136
properties={
136137
'name': StringField(
137138
analyzer=html_strip,

0 commit comments

Comments
 (0)