Match Specific element with specific id (RETURN-1 or 0)- DSL

If tags:[a,b,c,d....k], tags:[x,y,a,....b] are the fields,
I want to perform search in DSL (python), if tags:[a] is found, It should returns all id's which satisfies the search, then I want to search tags:[b] on same ids (to check if they are coming together), then tags:[c] then so on..if not found together it should return zero.
I am writing following code:

for l in range(0, ver):
.query("match",tags=lis[+int(l)] )
print responses
print ("")
if responses:
for hit in responses['hits']['hits']:
doc = {
'tags': lis[+int(l)]
# w=[hit['_id']]
#print w
#res ="trial", doc_type='modi',id=w[0], body=doc)
or"trial",doc_type='modi',id=hit['id'], body=doc)

                    print res
                    print ("")
                    if res:
                            print (res['_source'])

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.