Documentation
¶
Index ¶
- Constants
- type FieldValue
- type HistogramBucket
- type HistogramRequest
- type HistogramResponse
- type Matcher
- type Reader
- func (r *Reader) FieldValues(_ context.Context, field, prefix string, limit int) ([]FieldValue, error)
- func (r *Reader) Fields(_ context.Context) ([]string, error)
- func (r *Reader) Histogram(ctx context.Context, req HistogramRequest) (HistogramResponse, error)
- func (r *Reader) Search(ctx context.Context, req SearchRequest) (SearchResponse, error)
- type SearchRequest
- type SearchResponse
Constants ¶
const ( DefaultValuesLimit = 20 MaxValuesLimit = 100 )
const ( DefaultHistogramBuckets = 60 MaxHistogramBuckets = 200 MaxHistogramGroups = 6 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FieldValue ¶
type HistogramRequest ¶
type HistogramResponse ¶
type Matcher ¶
type Matcher struct {
// contains filtered or unexported fields
}
Matcher evaluates the web UI search syntax against individual entries by running each one through a private in-memory bleve index: index the entry, run the query, drop the entry. Slower than a hand-written evaluator, but the filter and the web search cannot drift apart.
func NewMatcher ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader searches log entries indexed by processors.Indexer.
func (*Reader) FieldValues ¶
func (r *Reader) FieldValues(_ context.Context, field, prefix string, limit int) ([]FieldValue, error)
FieldValues returns the indexed terms of a field, optionally filtered by prefix, with the number of entries containing each term. Terms come from the search index, so they are the analyzed (lowercased/tokenized) forms that fielded queries actually match. Fields indexed in binary form (timestamps, numerics) yield no printable terms and return an empty list.
func (*Reader) Fields ¶
Fields returns the names of the fields available for searching, sorted alphabetically.
func (*Reader) Histogram ¶
func (r *Reader) Histogram(ctx context.Context, req HistogramRequest) (HistogramResponse, error)
Histogram counts matching entries into time buckets, optionally split by the values of a field. bleve has no sub-aggregations, so the counts come from one date-range facet search per group.
func (*Reader) Search ¶
func (r *Reader) Search(ctx context.Context, req SearchRequest) (SearchResponse, error)