public class NestedQuery extends Object
Nested queries must be used along with
nested lists. Otherwise,
if there are several objects nested in a list, an entity would also match, if the filtered properties match
against any of the nested objects instead of all in a single one - which is most commonly wanted.
|Modifier||Constructor and Description|
Creates a new nested query for elements in the given field / list.
|Modifier and Type||Method and Description|
Compiles the query into a constraint.
Adds a simple
Appends an inner constraint.
protected NestedQuery(Mapping path)
path- the name of the list to search in.
public NestedQuery where(ElasticConstraint constraint)
Note that all fields must be fully qualified (e.g. list.valueX instead of simly valueX).
constraint- the filter to add
public NestedQuery eq(Mapping field, Object value)
FilterFactory.eq(Mapping, Object)filter as inner filter.
field- the fully qualified field to filter on
value- the value to filter on
public ElasticConstraint build()
Copyright © 2018. All rights reserved.