Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Rework Search engine: stemming and ranking

Open
#428 7 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp
Domain
search

Research direction

The issue lays out goals for stemming and search ranking but names no files, tests, or implementation entry points. Start by locating the search and stemming code and its existing tests, then compare candidate stemmers against the relevance examples in the issue. Done means retrieval avoids both missing and diluted results, and exact matches always rank above stemmed variations.

Written by the indexing model from the issue text.

Description

in this ticket I'll state the objective and proposal several candidates and compare them with previous work

How Muayyad Alsadi (me) define stemming differently

it's not a linguistic morphology that returns a proper dictionary word without prefixes and suffixes
it's a hashing function that its job is to cluster relevant more terms together and more irrelevant terms apart

for example, if stem('using')=stem('us') this is bad despite us being a dictionary term, because us (united states) is not relevant to "using"

on the other hand stemmer that return non word let's say stem(classes) = stem(class) = clas is a good stemmer despite clas with single s being a non dictionary proper term

Stemer choice

How to report a good stemming case

  • stem(A) = stem(B) when A and B are relevant
  • stem(A) != stem (B) when A and B are irrelevant

How to report a bad stemming case

  • stem(A) = stem(B) when A and B are irrelevant
  • stem(A) != stem (B) when A and B are relevant

Search Engine Success

Two fronts:

  • retrieval (what is in the matched set, regardless of order), a search that returns too few is bad (missing), too many (or all) is bad too (dilution)
  • ranking: given the same result set, how to score them, which one goes first

Stemmed term should never beat Exact regardless of stemmer

the formula should be designed so that regardless of how bad the stemmer is and how bad the choice of the blend multipliers, exact should always win.

a simple trick is to put max on denominator so that a stemmed variation of a term can never beat any of the exact.

Dominant language
C++
Stars
2.5k
Forks
158
Avg merge
2d 8h
Merged PRs (30d)
52

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from redhat-et/ripwire

All issues in redhat-et/ripwire

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.