Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add an exact search mode #1660

Merged
merged 1 commit into from
Feb 19, 2024
Merged

feat: add an exact search mode #1660

merged 1 commit into from
Feb 19, 2024

Conversation

lilydjwg
Copy link
Contributor

This pr adds a new search mode called "exact" as skim calls it, in which the query are matched as substrings of the target. In this way, there are much fewer results than the so-called fuzzy search mode, thus provide more relevant results as long as the query is correct.

I usually can't relate fuzzy results to my queries, so I always use this kind of substring match. There is also a full text search mode, which I find less useful as only one substring can be provided.

Checks

  • I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
  • I have checked that there are no existing pull requests for the same thing

@ellie
Copy link
Member

ellie commented Jan 31, 2024

I'd be happy to change fulltext to be this behaviour to be honest. At this point I'd rather not add any new search modes unless they're sufficiently different.

@lilydjwg
Copy link
Contributor Author

lilydjwg commented Jan 31, 2024

Do you want to rename "fulltext" to "exact" or "substr" for the change?

@atuin-bot
Copy link

This pull request has been mentioned on Atuin Community. There might be relevant details there:

https://forum.atuin.sh/t/search-output-order-is-not-what-i-expected/108/4

@ellie
Copy link
Member

ellie commented Feb 1, 2024

Do you want to rename "fulltext" to "exact" or "substr" for the change?

I think keep it as fulltext - with this change we're likely to break the installs for anyone currently using fulltext. Or at the very least alias it so that the config still works OK

I have absolutely no idea how many people use it though, so we shall have to see if this change is well accepted or not.

@lilydjwg
Copy link
Contributor Author

lilydjwg commented Feb 3, 2024

I failed to add an alias due to mehcode/config-rs#502.

@atuin-bot
Copy link

This pull request has been mentioned on Atuin Community. There might be relevant details there:

https://forum.atuin.sh/t/a-regex-search-mode/169/1

@ellie
Copy link
Member

ellie commented Feb 13, 2024

I failed to add an alias due to mehcode/config-rs#502.

in that case, let's change fulltext to be this behaviour :D

Copy link
Member

@ellie ellie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@ellie ellie merged commit 2a65f89 into atuinsh:main Feb 19, 2024
15 checks passed
@lilydjwg lilydjwg deleted the exact branch February 21, 2024 06:07
majutsushi added a commit to majutsushi/etc that referenced this pull request Apr 8, 2024
fulltext now searches for independent substrings
atuinsh/atuin#1660
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants