Building search into a Java music library with plain Lucene, one step at a time.
The tracks are indexed. Now we query them.
Should "Bob" in a title count for more than "Bob" in an album?
Step 1: start with no criteria. Open an IndexSearcher and fetch the first 10 hits. Each hit carries a Lucene doc number, so read the stored id and join back to your beans.
We're building search into a Java music library with plain Lucene, one step at a time.
Next up is analysis: what happens to your text before it reaches the index. An analyzer cuts it into tokens, lowercases them and folds the accents away.
Step 1: add lucene-analysis-common for ASCIIFoldingFilter. Pin the same version as lucene-core