Closed moritzschaefer closed 8 years ago
Thoughts: OR already implemented on master. Implement AND by Reformulation Score[key] = Score[key]*(IF doc not exists 0 else weight).
Reimplement rank ():
Input: OR_List and AND_List Output: One list ordered AND and complete with OR
assert or_combine_documents(or_list) == yourtesttargetlist assert and_combine_documents(and_list) == yourtesttargetlistforand assert and_combine_documents(and_list, or_list) == yourtesttargetlistforand
def or_combine_documents(list1, list2)
Thoughts: OR already implemented on master. Implement AND by Reformulation Score[key] = Score[key]*(IF doc not exists 0 else weight).
Reimplement rank ():
Input: OR_List and AND_List Output: One list ordered AND and complete with OR
assert or_combine_documents(or_list) == yourtesttargetlist assert and_combine_documents(and_list) == yourtesttargetlistforand assert and_combine_documents(and_list, or_list) == yourtesttargetlistforand
def or_combine_documents(list1, list2)