Closed sojusnik closed 5 years ago
I already thought about it, but I want to test first how much it impacts performance
And I will implement it with a config file specifying which file extensions are allowed to be scanned
If the performance impact is near zero I will add .txt files as default
Also this probably needs parallel crawling inside the file as well
Sounds great, thanks!
As you can imagine this is not very high in the priority list, heck Drill lacks A TON of other stuff, unless you can provide me a good example of "the average user needs to search inside .txt files for this reason" I will not increase the priority of this 🤔
@sojusnik
Do you actually need to search inside .txt often? Or can you provide me a use case when a user would do this often?
I could implement something like content:searchthisinsidefiles
Sorry for the delay, somehow overlooked this issue.
I'm actually searching quite a lot for the content of text files, not only inside .txt, but .md, .odt/.doc, .pdf and .epub files as well. Primary with gnome's tracker, but it's not the most reliable tool.
My use case is to search through my notes, mostly in .txt and .md (mostly for personal use), find documents faster through keywords within .odt/.doc files (mainly for work) and find important text passages in .pdfs (and .epub, if appropriate) for citing (mainly for academia).
@sojusnik I will add .txt and .md support with "content:contentToSearchHere"
Do you think "content:" should only search inside and not the filename? Or should merge the normal search with the content search?
About .pdf and other formats like .doc I need to test if they can be opened like regular .txt or if they need to be processed
@yatima1460 I think "content:" should only search inside files, not filenames too. This would prevent too cluttered search results, when searching only for filenames.
This is how I have implemented it:
A file will be searched for content if:
PDF and DOCs need processing and that would slow down even further, also I would need a pdf and docs library, do they even exist for D? And I would probably need to use a C one and bind that and test it, it's a lot of work for a marginal case for now
The Linux ecosystem desperately needs a reliable, fast and intuitive way to not only search for files, but its content as well. Did you think about implementing it in Drill too?