public class MoreSearch extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MoreSearch.Result |
static interface |
MoreSearch.ScrollCallback
Callback that receives message batches from
scrollQuery(String, Set, Set, TimeRange, int, ScrollCallback) . |
Constructor and Description |
---|
MoreSearch(StreamService streamService,
IndexRangeService indexRangeService,
QueryStringDecorators esQueryDecorators,
MoreSearchAdapter moreSearchAdapter) |
Modifier and Type | Method and Description |
---|---|
Set<Stream> |
loadStreams(Set<String> streamIds) |
static String |
luceneEscape(String searchString)
Helper to perform basic Lucene escaping of query string values
|
void |
scrollQuery(String queryString,
Set<String> streams,
Set<Parameter> queryParameters,
TimeRange timeRange,
int batchSize,
MoreSearch.ScrollCallback resultCallback)
This scrolls results for the given query, streams and time range from Elasticsearch.
|
@Inject public MoreSearch(StreamService streamService, IndexRangeService indexRangeService, QueryStringDecorators esQueryDecorators, MoreSearchAdapter moreSearchAdapter)
public void scrollQuery(String queryString, Set<String> streams, Set<Parameter> queryParameters, TimeRange timeRange, int batchSize, MoreSearch.ScrollCallback resultCallback) throws EventProcessorException
The search will continue until it is done, an error occurs or the search is stopped by setting the
continueScrolling
boolean to false
from the MoreSearch.ScrollCallback
.
queryString
- the search query stringstreams
- the set of streams to search intimeRange
- the time range for the searchbatchSize
- the number of documents to retrieve at onceresultCallback
- the callback that gets executed for each batchEventProcessorException
public static String luceneEscape(String searchString)
searchString
- search string which may contain unescaped reserved characters\
Copyright © 2012–2021 Graylog, Inc.. All rights reserved.