Now that an index is created, it can be used to execute queries. This recipe demonstrates what is probably the most basic of queries in Lucene.NET: the
TermQuery searches against document fields that are terms (in the previous example, the
length fields), where terms can be thought of as atomic search units and can have their explicit values compared to the search criteria.
The fluent API facade provides a method for performing a search on an index (aptly named
search). The method takes a subclass of the
Query class as a parameter that specifies what you want Lucene.NET to search for in the index.
The following example will execute a
TermQuery for documents ...