This basic Lucene example creates a simple index, and searches on it.
Note: RAMDirectory creates a memory-resident index, and is handy for experimenting and testing, but in practice most people will need to have an index stored in the file system (see FSDirectory.open).
import java.io.IOException...