Bruce Payette, co-founder of PowerShell, gave a talk on integrating full-text search using Lucene with PowerShell at the PowerShell Summit.
So I did a little refactoring and wrapped it in GUI, this is all PowerShell.
It indexed the content of 2500+ files in ~2 seconds.
Index and Search
Type in the name of the directory to be searched, including a filter,
c:\posh\*.ps1, press enter and it will recursively search the directory for all ps1 files and index the contents, keeping the index in memory. You can also search multiple directories with different filters. E.g.
Then, you can search for a term across everything that was indexed by typing in the
Query box and pressing enter.
What is Lucene?
Apache Lucene is a free and open-source information retrieval software library, originally written in Java by Doug Cutting. It is supported by the Apache Software Foundation and is released under the Apache Software License.
Who uses Lucene
- Apache SOLR (Used by OMS Operational Insights)
- Elastic Search (everybody uses this)
- 7digital (digital media)
Grab it all from my GitHub Repo.