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()); }