Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow searches that are sorted by, rather than restricted by, a criterion #1804
Currently, we can only specify that search results satisfy a criterion. We can't specify that we want results that may or may not satisfy that criterion but that are sorted so that the ones that do satisfy it occur at the top of the list. This means that I need to guess beforehand how many hits I'm likely to get. If I guess too low, I have to either page through lots of results that are not what I'm looking for, or follow it with a more restrictive search. If I guess too high, I have to follow it with a less restrictive search.
This commonly happens with exact match vs. stemmed match. Let's say I'm looking for a verb. First, I use the default match, which (for the languages I'm learning) is stemmed. However, since the stemmer is imperfect, the results include a lot of hits that include words that happen to start with that prefix but are not the verb I'm looking for. Then I need to do an exact-match search (starting with "=") against the infinitive.
Note that Sphinx supports sorting modes:
so maybe we could take advantage of that functionality.
I mentioned this subject on the Wall: