I have a dictionary:
{'Farage': [0, 5, 9, 192,233,341],
'EU': [0, 1, 5, 6, 9, 23]}
Query1: “Farage” and “EU”
Query2: “Farage” or “EU”
I need to return the documents that contain these queries. For query1, for example, the answer should be [0,5,9]. I believe the answer should be something like that but in python:
final_list = []
while x≠Null and y≠Null
do if docID(x)=docID(y)
then ADD(final_list, docID(x))
x← next(x)
y ←next(y)
else if docID(x) < docID(y)
then x← next(x)
else y ←next(y)
return final_list
Please help.