Wine colors establishment facet
This commit is contained in:
parent
8c83e7d1c6
commit
cc5763136b
|
|
@ -71,6 +71,14 @@ class EstablishmentDocument(Document):
|
|||
# 'coordinates': fields.GeoPointField(),
|
||||
'description': fields.ObjectField(attr='description_indexing', properties=OBJECT_FIELD_PROPERTIES),
|
||||
}),
|
||||
'wine_colors': fields.ObjectField(
|
||||
properties={
|
||||
'id': fields.IntegerField(),
|
||||
'label': fields.ObjectField(attr='label_indexing', properties=OBJECT_FIELD_PROPERTIES),
|
||||
'value': fields.KeywordField(),
|
||||
},
|
||||
multi=True,
|
||||
),
|
||||
'wine_sub_region': fields.ObjectField(properties={
|
||||
'id': fields.IntegerField(),
|
||||
'name': fields.KeywordField(),
|
||||
|
|
|
|||
|
|
@ -132,6 +132,14 @@ class EstablishmentDocumentViewSet(BaseDocumentViewSet):
|
|||
'size': utils.FACET_MAX_RESPONSE,
|
||||
},
|
||||
},
|
||||
'wine_colors': {
|
||||
'field': 'products.wine_colors.id',
|
||||
'facet': TermsFacet,
|
||||
'enabled': True,
|
||||
'options': {
|
||||
'size': utils.FACET_MAX_RESPONSE,
|
||||
},
|
||||
},
|
||||
'wine_region_id': {
|
||||
'field': 'products.wine_region.id',
|
||||
'facet': TermsFacet,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user