Skip to content

feat: add an exact search mode#1660

Merged
ellie merged 1 commit into
atuinsh:mainfrom
lilydjwg:exact
Feb 19, 2024
Merged

feat: add an exact search mode#1660
ellie merged 1 commit into
atuinsh:mainfrom
lilydjwg:exact

Conversation

@lilydjwg
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

lilydjwg commented Jan 31, 2024

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

@atuin-bot
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Contributor Author

lilydjwg commented Feb 3, 2024

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

@atuin-bot
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
@lilydjwg lilydjwg deleted the exact branch February 21, 2024 06:07
janlarres added a commit to janlarres/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.

3 participants