Skip to content

Commit

Permalink
work on ranking
Browse files Browse the repository at this point in the history
  • Loading branch information
capjamesg committed Nov 21, 2024
1 parent f08fbf1 commit f95ab98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jamesql/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f95ab98

Please sign in to comment.