Merge branch 'feature/cook_news_search' into 'develop'
Feature/cook news search See merge request gm/gm-backend!125
This commit is contained in:
commit
03fafae15f
|
|
@ -31,6 +31,7 @@ class NewsDocument(Document):
|
||||||
'id': fields.IntegerField(attr='id'),
|
'id': fields.IntegerField(attr='id'),
|
||||||
'label': fields.ObjectField(attr='label_indexing',
|
'label': fields.ObjectField(attr='label_indexing',
|
||||||
properties=OBJECT_FIELD_PROPERTIES),
|
properties=OBJECT_FIELD_PROPERTIES),
|
||||||
|
'value': fields.KeywordField()
|
||||||
},
|
},
|
||||||
multi=True)
|
multi=True)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,14 @@ class NewsDocumentViewSet(BaseDocumentViewSet):
|
||||||
'field': 'tags.id',
|
'field': 'tags.id',
|
||||||
'lookups': [
|
'lookups': [
|
||||||
constants.LOOKUP_QUERY_IN,
|
constants.LOOKUP_QUERY_IN,
|
||||||
|
constants.LOOKUP_QUERY_EXCLUDE
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'tag_value': {
|
||||||
|
'field': 'tags.value',
|
||||||
|
'lookups': [
|
||||||
|
constants.LOOKUP_QUERY_IN,
|
||||||
|
constants.LOOKUP_QUERY_EXCLUDE
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
'slug': 'slug',
|
'slug': 'slug',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user