For a project that searches textual files (mostly unstructured), I would like to use a library that can accomplish the following criteria:
- Fast search of thousands to hundreds of thousands keywords, returning their start and end position
- Limited search for regular expressions (potentially thousands in parallel) (It's hard to describe limited here, I'm mostly using repetitions, wildcards, optional characters)
- Support for searching words
The search results are then processed again:
- Arbitrary logical operations (AND, OR, NOT, combinations)
- Distance checks (e.g. the two keywords are ANDed, but need to occur mostly N characters apart)
Optional, but would be really great:
- Phonetic search
- Resillience to typos
Also, I want to be able to associate certain actions with search hits.
C++ or Java would work for me. Open-source is a must.