
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
Properties
Default
Default options with no limits.
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.
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.
Timeout
Maximum wall-clock time for this query. Default: no limit. When exceeded, search terminates early and returns partial results.
Methods
WithBudget(long)
Creates options with a specific memory budget.
WithTimeout(TimeSpan)
Creates options with a specific timeout.