Skip to content

feat: add flag to exclude directories from filtering#35

Open
dolsem wants to merge 2 commits into
ParthJadhav:masterfrom
dolsem:master
Open

feat: add flag to exclude directories from filtering#35
dolsem wants to merge 2 commits into
ParthJadhav:masterfrom
dolsem:master

Conversation

@dolsem

@dolsem dolsem commented Dec 17, 2023

Copy link
Copy Markdown

Currently if you apply filters to search it will ignore everything inside a directory that does not match a filter. So if you, for example. want to recursively find all files in the tree that have been modified today, it won't work. This is expect behavior of filter_entry(), see here.

This PR adds a flag to prevent applying filters to directories and only look at the files.

@edwardgra4ev

Copy link
Copy Markdown

@dolsem I decided to try Tauri, found this repository to implement the necessary functionality. I was very upset when I found this non-intuitive behavior. I'm waiting for your correction to be added

@dolsem

dolsem commented Dec 22, 2023

Copy link
Copy Markdown
Author

I updated the PR renaming the flag to just dirs and removing directory entries from results when set to false. I think this makes more sense.

@dolsem

dolsem commented Dec 22, 2023

Copy link
Copy Markdown
Author

I'd love to get feedback on the PR, if there is interest in merging it, I can update document this feature in the README as well.

@edwardgra4ev

Copy link
Copy Markdown

@dolsem There is a lot of interest. I am currently studying rust and tauri on my project using "Rust search" and your changes have helped me a lot in the project.
Now in my project, "rust search" is taken from your fork

@dolsem

dolsem commented Dec 24, 2023

Copy link
Copy Markdown
Author

@edwardgra4ev thank you, that's good to know. Hopefully there will be interest from maintainers as well, so that the PR can get merged.

@ParthJadhav

Copy link
Copy Markdown
Owner

Hey guys, I created this repository solely to work as a search library for Verve. I'm working on other stuff currently and don't get much time to work on my open-source projects.

I'll merge these changes. Thanks for the contribution @dolsem and sorry for the delay @edwardgra4ev .

@ParthJadhav

Copy link
Copy Markdown
Owner

Hey @dolsem , the builds are failing. Can you have a look?

@dolsem

dolsem commented Dec 24, 2023

Copy link
Copy Markdown
Author

@ParthJadhav I'll update it today.

@dolsem

dolsem commented Dec 26, 2023

Copy link
Copy Markdown
Author

@ParthJadhav I fixed all the broken tests

@dolsem

dolsem commented Jan 11, 2024

Copy link
Copy Markdown
Author

@ParthJadhav any update?

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