File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -214,17 +214,16 @@ async def edge_fulltext_search(
214214 for r in res ['hits' ]['hits' ]:
215215 input_ids .append ({'id' : r ['_source' ]['uuid' ], 'score' : r ['_score' ]})
216216
217+ filter_query = filter_query + ' AND id(e)=id ' if filter_query else ' WHERE id(e)=id '
218+
217219 # Match the edge ids and return the values
218220 query = (
219221 """
220- UNWIND $ids as id
221- MATCH (n:Entity)-[e:RELATES_TO]->(m:Entity)
222- WHERE e.group_id IN $group_ids
223- AND id(e)=id
224- """
225- + filter_query
226- + """
227- AND id(e)=id
222+ UNWIND $ids as id
223+ MATCH (n:Entity)-[e:RELATES_TO]->(m:Entity)
224+ """
225+ + filter_query +
226+ """
228227 WITH e, id.score as score, startNode(e) AS n, endNode(e) AS m
229228 RETURN
230229 e.uuid AS uuid,
@@ -240,7 +239,7 @@ async def edge_fulltext_search(
240239 e.invalid_at AS invalid_at,
241240 properties(e) AS attributes
242241 ORDER BY score DESC LIMIT $limit
243- """
242+ """
244243 )
245244
246245 records , _ , _ = await driver .execute_query (
You can’t perform that action at this time.
0 commit comments