Live data from Hacker News

Ask HN: Grep like tools for full text search?

news.ycombinator.com

1–9 of 9 posts

Re: Ask HN: Grep like tools for full text search?

#2
You may get some mileage out of Swish-e[1].

And while it's not it's primary purpose, Lucene comes with some CLI programs[2]. They are there mainly as a demo, but if you feel like writing some code you might be able to adapt that to your needs.

[1]: https://www.esa.org/tiee/search/html/readme.html

[2]: https://lucene.apache.org/core/3_5_0/demo.html

Re: Ask HN: Grep like tools for full text search?

#3
I use Recoll:

https://www.lesbonscomptes.com/recoll/

There is a GUI, but it has a perfectly serviceable command-line interface as well. For example, this command lists all files with the exact phrase 'moved permanently':

    recoll -t -l '"moved permanently"'
And this command finds all files ending in '.py' and under a directory called 'Dropbox' that contain the exact words "import" and "logging":

    recoll -t -l "ext:py dir:Dropbox/ Import Logging"
It can take some time and effort to configure, but I have found it to be well worth it.

Re: Ask HN: Grep like tools for full text search?

#6
Why not grep? Are you saying you want full text search with like, stemming and result ranking?

If I can piggyback on your question, my notes are in Word files and I sure wish I could grep those. I bet none of the answers at https://superuser.com/questions/70343/grep-in-microsoft-word work any more because Microsoft will keep changing the file format.

Re: Ask HN: Grep like tools for full text search?

#8

Why not grep? Are you saying you want full text search with like, stemming and result ranking? If I can piggyback on your question, my notes are in Word files and I sure wish I could grep those. I bet none of the answers at https://superuser.com/questions/70343/grep-in-microsoft-word work any more because Microsoft will keep changing the file format.

Because grep is not a "full text search tool".

Full text search [1] is different from regular expression search.

[1] https://en.wikipedia.org/wiki/Full-text_search