ESIntegTestCase and Search Templates in ES 5.6.4


(James McGarry) #1

Hi,
I am interestes to know does the "ESIntegTestCase" support the use of SearchTemplateRequestBuilder in ES 5.6?

For example, as part of a test extending ESIntegTestCase:

SearchResponse response = client.prepareSearch(INDEX_NAME).setTypes(INDEX_TYPE)
_ .setQuery(QueryBuilders.termQuery("id", id)).execute().get();

works fine, however

SearchTemplateRequestBuilder searchTemplateBuilder = new SearchTemplateRequestBuilder(client);
_ SearchRequest searchRequest = new SearchRequest().indices(INDEX_NAME).types(INDEX_TYPE);_
_ searchTemplateBuilder.setRequest(searchRequest).setScript(script).setScriptType(ScriptType.INLINE)_
_ .setScriptParams(parameters);_
SearchResponse response = searchTemplateBuilder.get().getResponse();

fails with exception:
java.util.concurrent.ExecutionException: java.lang.NullPointerException
_ at _randomizedtesting.SeedInfo.seed

Thanks in advance fr any advice,
James


(Simon Willnauer) #2

can I see the rest of the stacktrace?


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.