Skip to content

Is there a way to sort results by preferred directories? #2796

Answered by BurntSushi
rieje asked this question in Q&A
Discussion options

You must be logged in to vote

No. It doesn't really make sense for ripgrep to do something like this. It makes a lot more sense for you to use ripgrep to implement it though. You can run multiple searches. Maybe the first search only searches high priority things, while the second search searches lower priority things. Otherwise, ripgrep doesn't really have a notion of relevance, other than the "smart" filtering it does by default. That is, it very explicitly does not rank results and never will. (If you want ranked results, then you probably want an informational retrieval system.)

Unrelated question: should one make any effort to ignore directories containing e.g. many binary files and databases to improve performa…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants