Apache Lucene.Net 2.4.0 Class Library API

BooleanQuery.SetAllowDocsOutOfOrder Method 

Expert: Indicates whether hit docs may be collected out of docid order.

Background: although the contract of the Scorer class requires that documents be iterated in order of doc id, this was not true in early versions of Lucene. Many pieces of functionality in the current Lucene code base have undefined behavior if this contract is not upheld, but in some specific simple cases may be faster. (For example: disjunction queries with less than 32 prohibited clauses; This setting has no effect for other queries.)

Specifics: By setting this option to true, calls to {@link HitCollector#Collect(int,float)} might be invoked first for docid N and only later for docid N-1. Being static, this setting is system wide.

public static void SetAllowDocsOutOfOrder(
   bool allow
);

See Also

BooleanQuery Class | Lucene.Net.Search Namespace