moritzschaefer / the-search-engine

Website crawler and attached search engine for the results.
MIT License
3 stars 3 forks source link

Add an option for OR and for AND search? #27

Closed moritzschaefer closed 8 years ago

brianignacio5 commented 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)