Fixing compile issue with ScriptType after merge with master

This commit is contained in:
Christoph Büscher 2016-11-01 14:42:24 +01:00
parent 0b8a2e40cb
commit 51102ee91c
1 changed files with 5 additions and 5 deletions

View File

@ -32,7 +32,7 @@ import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.index.query.QueryParseContext;
import org.elasticsearch.indices.query.IndicesQueriesRegistry;
import org.elasticsearch.script.Script;
import org.elasticsearch.script.ScriptService;
import org.elasticsearch.script.ScriptType;
import org.elasticsearch.search.SearchModule;
import org.elasticsearch.search.SearchRequestParsers;
import org.elasticsearch.search.aggregations.AggregatorParsers;
@ -104,9 +104,9 @@ public class RankEvalSpecTests extends ESTestCase {
if (randomBoolean()) {
final Map<String, Object> params = randomBoolean() ? null : Collections.singletonMap("key", "value");
ScriptService.ScriptType scriptType = randomFrom(ScriptService.ScriptType.values());
ScriptType scriptType = randomFrom(ScriptType.values());
String script;
if (scriptType == ScriptService.ScriptType.INLINE) {
if (scriptType == ScriptType.INLINE) {
try (XContentBuilder builder = XContentBuilder.builder(xContent)) {
builder.startObject();
builder.field("field", randomAsciiOfLengthBetween(1, 5));
@ -122,7 +122,7 @@ public class RankEvalSpecTests extends ESTestCase {
scriptType,
randomFrom("_lang1", "_lang2", null),
params,
scriptType == ScriptService.ScriptType.INLINE ? xContent.type() : null));
scriptType == ScriptType.INLINE ? xContent.type() : null));
}
XContentBuilder builder = XContentFactory.contentBuilder(contentType);