From 123b21f4ae2034b2fb42aae335ce8d7010a55c11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Laleve=CC=81e?= Date: Mon, 23 May 2011 13:40:13 +0200 Subject: [PATCH] fix the build of a phrase query in the java client --- .../elasticsearch/index/query/xcontent/TextQueryBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/TextQueryBuilder.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/TextQueryBuilder.java index cd438fd7a88..c88f653d273 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/TextQueryBuilder.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/TextQueryBuilder.java @@ -129,7 +129,7 @@ public class TextQueryBuilder extends BaseQueryBuilder { builder.startObject(TextQueryParser.NAME); builder.startObject(name); - builder.field("text", text); + builder.field("query", text); if (type != null) { builder.field("type", type.toString().toLowerCase()); }