Table of Contents

Public classSealed SearchOptions

Namespace
Rowles.LeanLucene.Search
Assembly
Rowles.LeanLucene.dll

Per-query options controlling resource usage and result delivery. Pass to IndexSearcher.Search() overloads to limit memory and enable streaming.

public sealed class SearchOptions
SearchOptions

Properties

Public propertyStaticRead-only Default

Default options with no limits.

Public property MaxResultBytes

Maximum estimated bytes this query is allowed to allocate for intermediate structures (posting lists, score buffers, etc.). Default: no limit (long.MaxValue). When exceeded, search terminates early and returns partial results.

Public property StreamResults

When true, results are yielded as they are found rather than collected into a complete TopDocs. Useful for large result sets where the caller processes documents one-by-one. Default: false.

Public property Timeout

Maximum wall-clock time for this query. Default: no limit. When exceeded, search terminates early and returns partial results.

Methods

Public methodStatic WithBudget(long)

Creates options with a specific memory budget.

Public methodStatic WithTimeout(TimeSpan)

Creates options with a specific timeout.