I have a small website running on Java with probably a dozen of markdown files. I want to provide a full text search for user to quickly access those markdown files. Since i
As a side project I have implemented a simple in memory text search solution for java.
https://github.com/bradforj287/SimpleTextSearch
Key Features:
Might want to take a look.
Drop in Apache Lucene, the more-or-less gold standard in full-text search. It is happy to operate in memory.
Use one of the in-memory databases, either H2 or HSQLDB. Then, for the full text search part, just use Hibernate Search. It will work with either of the two DBs and it will keep you from having to deal with Lucene at all: you can just annotate your entities, and go: all the indexing will happen automatically, and if you want to do things like boost fields, you can do that with a simple annotation.