From 8326d8e7fe8727ae0b4c3d20733d5253d07fbf4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 12 Jan 2018 11:17:52 +0100 Subject: [PATCH] Elastic query: remove matching on document type. ElasticSearch 6 removes support for different document types in one index, so we don't have to match for it any more. Furthermore, elasticsearch_dsl seems to save with the generic 'doc' type, so this check is counter-productive. --- pillar/api/search/queries.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pillar/api/search/queries.py b/pillar/api/search/queries.py index ac519ed4..0de4e2fd 100644 --- a/pillar/api/search/queries.py +++ b/pillar/api/search/queries.py @@ -72,9 +72,7 @@ def do_node_search(query: str, terms: dict, page: int) -> dict: Q('term', tags=query), ] - must = [ - Q('term', _type='node') - ] + must = [] if not query: should = []