[TEST] Fix indexed script test.

This commit is contained in:
Brian Murphy 2014-07-22 13:58:07 +01:00
parent 79433d23e3
commit 0de30e1798

View File

@ -58,7 +58,7 @@ public class IndexedScriptTests extends ElasticsearchIntegrationTest {
indexRandom(true,builders);
SearchResponse searchResponse;
String query = "{ \"query\" : { \"match_all\": {}} , \"script_fields\" : { \"test1\" : { \"id\" : \"script1\", \"lang\":\"groovy\" }, \"test2\" : { \"id\" : \"script2\", \"lang\":\"groovy\", \"params\":{\"factor\":3} }}, size:1}";
String query = "{ \"query\" : { \"match_all\": {}} , \"script_fields\" : { \"test1\" : { \"script_id\" : \"script1\", \"lang\":\"groovy\" }, \"test2\" : { \"script_id\" : \"script2\", \"lang\":\"groovy\", \"params\":{\"factor\":3} }}, size:1}";
searchResponse = client().prepareSearch().setSource(query).setIndices("test").setTypes("scriptTest").get();
assertHitCount(searchResponse,5);
assertTrue(searchResponse.getHits().hits().length == 1);