diff --git a/jamesql/index.py b/jamesql/index.py index 5409fec..a3997ec 100644 --- a/jamesql/index.py +++ b/jamesql/index.py @@ -938,7 +938,7 @@ def search( if found and field != "title_lower": # print(first_word_pos, doc["title"], field, "union") occurences = len(first_word_pos) - doc_scores[doc["uuid"]] *= 1 + (occurences / len(term_queries)) + doc_scores[doc["uuid"]] += len(first_word_pos) # * len(set(word_pos[term_queries[0]])) elif found and field == "title_lower": # get word overlap between title and terms