Skip to content

Latest commit

 

History

History
38 lines (38 loc) · 1.19 KB

File metadata and controls

38 lines (38 loc) · 1.19 KB

Scoring and Relevancy example

This comics example is mainly about relevancy and scoring.

Redis University Link

redis-cli < create_idx.txt
  • Add two non-weighted records
redis-cli < add_comics.txt
  • search using keys hero
redis-cli < queries.txt

The resulting relevancy (score) tells us that Spiderman is a more likely hero than Batman because the word 'hero' appears more often for 'Spiderman' (term frequency).

  • modify the data to add a rating column and add superman
redis-cli < modify.txt
  • Run same search again now with ratings considered
redis-cli < queries.txt

now adding weights

redis-cli flushall
redis-cli < create_idx_rating.txt
redis-cli < add-comics2.txt
redis-cli < queries.txt
  • run explainscore for more detail
redis-cli < queries_explain.txt