@Singleton public class Searches extends Object
| Constructor and Description |
|---|
Searches(IndexRangeService indexRangeService,
com.codahale.metrics.MetricRegistry metricRegistry,
StreamService streamService,
Indices indices,
IndexSetRegistry indexSetRegistry,
SearchesAdapter searchesAdapter) |
| Modifier and Type | Method and Description |
|---|---|
CountResult |
count(String query,
TimeRange range) |
CountResult |
count(String query,
TimeRange range,
String filter) |
static Optional<String> |
extractStreamId(String filter)
Extracts the last stream id from the filter string passed as part of the elasticsearch query.
|
FieldStatsResult |
fieldStats(String field,
String query,
String filter,
TimeRange range,
boolean includeCardinality,
boolean includeStats,
boolean includeCount) |
FieldStatsResult |
fieldStats(String field,
String query,
TimeRange range) |
ScrollResult |
scroll(String query,
TimeRange range,
int limit,
int offset,
List<String> fields,
String filter,
int batchSize)
Deprecated.
|
SearchResult |
search(SearchesConfig config) |
SearchResult |
search(String query,
String filter,
TimeRange range,
int limit,
int offset,
Sorting sorting) |
SearchResult |
search(String query,
TimeRange range,
int limit,
int offset,
Sorting sorting) |
@Inject public Searches(IndexRangeService indexRangeService, com.codahale.metrics.MetricRegistry metricRegistry, StreamService streamService, Indices indices, IndexSetRegistry indexSetRegistry, SearchesAdapter searchesAdapter)
public CountResult count(String query, TimeRange range)
public CountResult count(String query, TimeRange range, String filter)
@Deprecated public ScrollResult scroll(String query, TimeRange range, int limit, int offset, List<String> fields, String filter, int batchSize)
public SearchResult search(String query, TimeRange range, int limit, int offset, Sorting sorting)
public SearchResult search(String query, String filter, TimeRange range, int limit, int offset, Sorting sorting)
public SearchResult search(SearchesConfig config)
public FieldStatsResult fieldStats(String field, String query, TimeRange range)
public FieldStatsResult fieldStats(String field, String query, String filter, TimeRange range, boolean includeCardinality, boolean includeStats, boolean includeCount)
public static Optional<String> extractStreamId(String filter)
filter - the filter string like "streams:xxxyyyzzz"Copyright © 2012–2021 Graylog, Inc.. All rights reserved.