Search in sources :

Example 26 with SearchConfig

use of org.graylog.plugins.views.search.engine.SearchConfig in project graylog2-server by Graylog2.

the class ElasticsearchBackendTest method generatesSearchForEmptySearchTypes.

@Test
public void generatesSearchForEmptySearchTypes() throws Exception {
    final Query query = Query.builder().id("query1").query(ElasticsearchQueryString.of("")).timerange(RelativeRange.create(300)).build();
    final Search search = Search.builder().queries(ImmutableSet.of(query)).build();
    final SearchJob job = new SearchJob("deadbeef", search, "admin");
    backend.generate(job, query, new SearchConfig(Period.ZERO));
}
Also used : Query(org.graylog.plugins.views.search.Query) Search(org.graylog.plugins.views.search.Search) SearchJob(org.graylog.plugins.views.search.SearchJob) SearchConfig(org.graylog.plugins.views.search.engine.SearchConfig) Test(org.junit.Test)

Aggregations

SearchConfig (org.graylog.plugins.views.search.engine.SearchConfig)26 Test (org.junit.Test)22 SearchJob (org.graylog.plugins.views.search.SearchJob)8 ElasticsearchQueryString (org.graylog.plugins.views.search.elasticsearch.ElasticsearchQueryString)7 Query (org.graylog.plugins.views.search.Query)6 Search (org.graylog.plugins.views.search.Search)6 SearchRequest (org.graylog.shaded.elasticsearch7.org.elasticsearch.action.search.SearchRequest)6 MultiSearchResponse (org.graylog.shaded.elasticsearch7.org.elasticsearch.action.search.MultiSearchResponse)5 QueryResult (org.graylog.plugins.views.search.QueryResult)4 PivotResult (org.graylog.plugins.views.search.searchtypes.pivot.PivotResult)4 TimeRange (org.graylog2.plugin.indexer.searches.timeranges.TimeRange)4 MultiSearch (io.searchbox.core.MultiSearch)3 ArrayList (java.util.ArrayList)2 SearchTypeError (org.graylog.plugins.views.search.errors.SearchTypeError)2 DerivedTimeRange (org.graylog.plugins.views.search.timeranges.DerivedTimeRange)2 DocumentContext (com.jayway.jsonpath.DocumentContext)1