fix product country filter in ES
This commit is contained in:
parent
d932df4392
commit
498e8ac126
|
|
@ -34,7 +34,19 @@ class ProductDocument(Document):
|
||||||
'id': fields.IntegerField(),
|
'id': fields.IntegerField(),
|
||||||
'name': fields.KeywordField(),
|
'name': fields.KeywordField(),
|
||||||
'slug': fields.KeywordField(),
|
'slug': fields.KeywordField(),
|
||||||
# 'city' TODO: city indexing
|
'address': fields.ObjectField(
|
||||||
|
properties={
|
||||||
|
'city': fields.ObjectField(
|
||||||
|
properties={
|
||||||
|
'country': fields.ObjectField(
|
||||||
|
properties={
|
||||||
|
'code': fields.KeywordField()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
wine_colors = fields.ObjectField(
|
wine_colors = fields.ObjectField(
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,7 @@ class ProductDocumentViewSet(BaseDocumentViewSet):
|
||||||
'lookups': [constants.LOOKUP_QUERY_IN],
|
'lookups': [constants.LOOKUP_QUERY_IN],
|
||||||
},
|
},
|
||||||
'country': {
|
'country': {
|
||||||
'field': 'wine_region.country.code',
|
'field': 'establishment.address.city.country.code',
|
||||||
},
|
},
|
||||||
'wine_colors_id': {
|
'wine_colors_id': {
|
||||||
'field': 'wine_colors.id',
|
'field': 'wine_colors.id',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user