Table of Contents

Public classSealed SearchAnalytics

Namespace
Rowles.LeanLucene.Diagnostics
Assembly
Rowles.LeanLucene.dll

Thread-safe ring buffer of per-search events. Events are captured in Search(Query, int) when wired via SearchAnalytics.

public sealed class SearchAnalytics
SearchAnalytics

Constructors

Public constructor SearchAnalytics(int)

Creates a new analytics buffer with the given capacity (drop-oldest on overflow).

Methods

Public method DrainEvents()

Returns all buffered events as an enumerable, draining the buffer.

Public method ExportJson(TextWriter)

Exports all buffered events as JSON to the given writer, draining the buffer.

Public method GetRecentEvents(int)

Returns up to count most recent events.

Internal methodInternal Record(Query, TimeSpan, int, bool)

Records a search event. Called internally by IndexSearcher.