One of the great things about Lucene.NET is the ease by which you can implement different types of searches with minimal change to your code. The following examples demonstrate several types of searches that differ only by the creation of a different search object that is passed to
IndexSearcher. All code for setting up a search, executing the search, and processing results are identical, with just a simple change to the type of query object that is created!
For demonstration of several of the following queries (all but
PhraseQuery), the example facade provides the
buildLexicographicalExampleIndex method that will be called instead of indexing
tm.txt. Using the content created ...