The analyzer is the core component of indexing process, your query string also has to be analyzed at first and then be searched. Usually the analyzing of query string is called parsing, but the internal working mechanism are the same. Both of them need to split the text into token stream.
In last post, we introduced some important classes of Lucece write index components. Another component is searching the index.
The Lucene 4 API has changed a lot. IndexSearcher need an instance of IndexReader, get this instance by calling the static method open of DirectoryReader. The Directory is the index data storage used in writing index.
Solr is based on Lucene, but provide a WEB user interface, you specify the fields by xml configuration file and let Solr to call Lucene API to index these fields.
This post demonstrate how Solr did it under the hood. We use the Lucene API directly to index information.