atom-community / atom-community/zadeh

Higher score to filename matches

Open
#100 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
28
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Thanks for this great library, it's really fast!

## Summary

Prioritize (either by default or with some option) matches in the filename (i.e. not any of the folders/rest of path).

## Additional context

Simple example:
```
> const zadeh = require('zadeh')
undefined
> zadeh.filter(['foo/bar/baz_qux.js', 'foo/bazqux/a.js'], 'bazqux')
Zadeh: deprecated function. Use 'StringArrayFilterer' instead
[ 'foo/bazqux/a.js', 'foo/bar/baz_qux.js' ]
```
In my usage, I would generally actually prefer the result for `baz_qux.js` because I remember and search mostly based on filename.

I do see `useExtensionBonus` option, couldn't find any clear documentation on what that actually means but it doesn't seem to make any difference.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the zadeh.filter example and inspect the StringArrayFilterer behavior, including the useExtensionBonus option mentioned in the issue. Done means filename matches rank ahead of matches found only in directory names, either by default or through a documented option, with the example producing the preferred order.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, node.js
Domain
search
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.