« Back Issue #510
  • 2023-09-14 09:40 Reported by gargisheguri
  • 2023-09-21 20:28 Marked fixed
Status: Marked fixed
Priority: Medium

Add search factors inspired by FI_IS_WIKI and FI_NUM_SLASHES

gargisheguri 2023-09-14 09:40

Add the following search factors: - Bonus factor if the URL is a Wikipedia page - Bonus factor inversely proportional to the number of slashes in the URL trailing the hostname (based on the assumption that the greater the number of slashes, the further it is from the root page of the site)

gargisheguri 2023-09-15 12:43

- Added a bonus factor WIKI_BONUS that adds 0.5 to the doc_rank if the url contains "wikipedia" in the hostname - Added a bonus factor NUM_SLASHES that adds (0.5 / x) to the doc_rank, where x represents the number of slashes trailing the hostname in the url:

    - x = 1 (slashes count between 0 and 1)
    - x = 2 (slashes count between 2 and 4)
    - x = 3 (slashes count between 5 and 6) 
    - x = 4 (slashes count > 6)

- The letter_code (part of docid) now has the following format:

   - 8th bit: represents whether cld or not
   - bits 4/5/6/7: represent letter code (doc type)
   - 3rd bit: represents whether wikipedia page or not
   - bits 1/2: represent number of slashes

- Letter code is a char mapped to the corresponding int value (i.e. the 9 possible values of letter_code are mapped between bytes 4-7 as values 0-8)

gargisheguri 2023-09-20 15:40
gargisheguri 2023-09-21 19:59
administrator 2023-09-21 20:28

Thanks for the patch. Fixed with commit 0b24ec8bf8

X