From e4d35c458a8984bc45cd7d853db7319c9fa6a6f6 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Thu, 7 Aug 2014 23:50:23 +0200 Subject: [PATCH] [TEST] Associate type with percolate query --- .../java/org/elasticsearch/percolator/PercolatorTests.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/test/java/org/elasticsearch/percolator/PercolatorTests.java b/src/test/java/org/elasticsearch/percolator/PercolatorTests.java index 0dd69a68d80..8c1df11a473 100644 --- a/src/test/java/org/elasticsearch/percolator/PercolatorTests.java +++ b/src/test/java/org/elasticsearch/percolator/PercolatorTests.java @@ -1720,14 +1720,12 @@ public class PercolatorTests extends ElasticsearchIntegrationTest { assertMatchCount(percolateResponse, 0l); assertThat(percolateResponse.getMatches(), arrayWithSize(0)); - - ensureYellow("idx"); waitForConcreteMappingsOnAll("idx", "type", "custom.color"); // The previous percolate request introduced the custom.color field, so now we register the query again // and the field name `color` will be resolved to `custom.color` field in mapping via smart field mapping resolving. client().prepareIndex("idx", PercolatorService.TYPE_NAME, "2") - .setSource(jsonBuilder().startObject().field("query", QueryBuilders.queryString("color:blue")).endObject()) + .setSource(jsonBuilder().startObject().field("query", QueryBuilders.queryString("color:blue")).field("type", "type").endObject()) .get(); // The second request will yield a match, since the query during the proper field during parsing.