summaryrefslogtreecommitdiff
path: root/core/src/main/java/org/elasticsearch/index/query/QueryBuilders.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/java/org/elasticsearch/index/query/QueryBuilders.java')
-rw-r--r--core/src/main/java/org/elasticsearch/index/query/QueryBuilders.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/core/src/main/java/org/elasticsearch/index/query/QueryBuilders.java b/core/src/main/java/org/elasticsearch/index/query/QueryBuilders.java
index 6e9c86b4c6..03ccebf047 100644
--- a/core/src/main/java/org/elasticsearch/index/query/QueryBuilders.java
+++ b/core/src/main/java/org/elasticsearch/index/query/QueryBuilders.java
@@ -199,7 +199,14 @@ public abstract class QueryBuilders {
*
* @param name The name of the field
* @param value The value of the term
+ *
+ * @deprecated Fuzzy queries are not useful enough and will be removed with Elasticsearch 4.0. In most cases you may want to use
+ * a match query with the fuzziness parameter for strings or range queries for numeric and date fields.
+ *
+ * @see #matchQuery(String, Object)
+ * @see #rangeQuery(String)
*/
+ @Deprecated
public static FuzzyQueryBuilder fuzzyQuery(String name, String value) {
return new FuzzyQueryBuilder(name, value);
}
@@ -209,7 +216,14 @@ public abstract class QueryBuilders {
*
* @param name The name of the field
* @param value The value of the term
+ *
+ * @deprecated Fuzzy queries are not useful enough and will be removed with Elasticsearch 4.0. In most cases you may want to use
+ * a match query with the fuzziness parameter for strings or range queries for numeric and date fields.
+ *
+ * @see #matchQuery(String, Object)
+ * @see #rangeQuery(String)
*/
+ @Deprecated
public static FuzzyQueryBuilder fuzzyQuery(String name, Object value) {
return new FuzzyQueryBuilder(name, value);
}
@@ -490,6 +504,14 @@ public abstract class QueryBuilders {
return new HasParentQueryBuilder(type, query);
}
+ /**
+ * Constructs a new parent id query that returns all child documents of the specified type that
+ * point to the specified id.
+ */
+ public static ParentIdQueryBuilder parentId(String type, String id) {
+ return new ParentIdQueryBuilder(type, id);
+ }
+
public static NestedQueryBuilder nestedQuery(String path, QueryBuilder query) {
return new NestedQueryBuilder(path, query);
}