Mbonea commited on
Commit
6a4ee1a
·
1 Parent(s): 40f4520

get only inner hits

Browse files
Files changed (1) hide show
  1. App/Embedding/utils/Elastic.py +6 -1
App/Embedding/utils/Elastic.py CHANGED
@@ -26,4 +26,9 @@ def FetchDocuments(ids):
26
  },
27
  },
28
  )
29
- return res
 
 
 
 
 
 
26
  },
27
  },
28
  )
29
+
30
+ response=[]
31
+ for data in res["hits"]["hits"]:
32
+ temp=data["inner_hits"]["simple"]["hits"]["hits"]
33
+ response.append(temp)
34
+ return response