public class ElasticsearchBackend extends Object implements QueryBackend<ESGeneratedQueryContext>
| Constructor and Description |
|---|
ElasticsearchBackend(Map<String,javax.inject.Provider<ESSearchTypeHandler<? extends SearchType>>> elasticsearchSearchTypeHandlers,
QueryStringParser queryStringParser,
io.searchbox.client.JestClient jestClient,
IndexRangeService indexRangeService,
StreamService streamService,
ESQueryDecorators esQueryDecorators) |
| Modifier and Type | Method and Description |
|---|---|
QueryResult |
doRun(SearchJob job,
Query query,
ESGeneratedQueryContext queryContext,
Set<QueryResult> predecessorResults)
Run the generated query as part of the given query job.
|
ESGeneratedQueryContext |
generate(SearchJob job,
Query query,
Set<QueryResult> results)
Generate a backend-specific query out of the logical query structure.
|
Optional<org.elasticsearch.index.query.QueryBuilder> |
generateFilterClause(Filter filter,
SearchJob job,
Query query,
Set<QueryResult> results) |
QueryMetadata |
parse(com.google.common.collect.ImmutableSet<Parameter> declaredParameters,
Query query)
Parse the query and return structural information about it.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waiteffectiveTimeRangeForResult, isAllMessages, run@Inject public ElasticsearchBackend(Map<String,javax.inject.Provider<ESSearchTypeHandler<? extends SearchType>>> elasticsearchSearchTypeHandlers, QueryStringParser queryStringParser, io.searchbox.client.JestClient jestClient, IndexRangeService indexRangeService, StreamService streamService, ESQueryDecorators esQueryDecorators)
public ESGeneratedQueryContext generate(SearchJob job, Query query, Set<QueryResult> results)
QueryBackendgenerate in interface QueryBackend<ESGeneratedQueryContext>job - currently executing jobquery - the graylog query structureresults - the query result of the preceding queriespublic Optional<org.elasticsearch.index.query.QueryBuilder> generateFilterClause(Filter filter, SearchJob job, Query query, Set<QueryResult> results)
public QueryResult doRun(SearchJob job, Query query, ESGeneratedQueryContext queryContext, Set<QueryResult> predecessorResults)
QueryBackendThis method is typically being run in an executor and can safely block.
doRun in interface QueryBackend<ESGeneratedQueryContext>job - currently executing jobquery - the individual query to run from the current jobqueryContext - the generated query by QueryBackend.generate(SearchJob, Query, Set)predecessorResults - the query result of the preceding queriespublic QueryMetadata parse(com.google.common.collect.ImmutableSet<Parameter> declaredParameters, Query query)
QueryBackendThis method decomposes the backend-specific query and returns information about used parameters, optionally the AST for syntax highlight and other information the UI can use to offer help.
parse in interface QueryBackend<ESGeneratedQueryContext>Copyright © 2012–2020 Graylog, Inc.. All rights reserved.