@StableMinor(version="12.3", sinceVersion="8.2") public class NestedObjectFilter extends Object implements ISearchQueryFilter
For example, if a document has a field with dataType
=
DocumentTypeField.DataType.NESTED_OBJECT
and list
= true
with the following values:
If you do a search using as filter nested.field1="A" AND nested.field2="Z"
, this search would find this
document, because it does not force the field values from being in the same nested object. But if you put a
NestedObjectFilter
around that search filter, the search would not return this document, since there is not a
single instance of the nested object field that corresponds to the filter.
It is possible to use a NestedObjectFilter
in a filter used inside another NestedObjectFilter
. This
can be used when it is necessary to apply filters independently on a nested object values that is inside another
nested object that also needs to be filtered by its values independently.
Constructor and Description |
---|
NestedObjectFilter(CompositeDocumentTypeField nestedObjectField,
ISearchQueryFilter filter)
Creates a new
NestedObjectFilter . |
Modifier and Type | Method and Description |
---|---|
ISearchQueryFilter |
getFilter()
Returns the filter that will be applied to each value, separately, of the nested object field available at
getNestedObjectField() . |
CompositeDocumentTypeField |
getNestedObjectField()
Returns the
nested object field whose values are to be considered independently
when applying the filter available at getFilter() . |
public NestedObjectFilter(CompositeDocumentTypeField nestedObjectField, ISearchQueryFilter filter)
NestedObjectFilter
.nestedObjectField
- the nested object
field whose values are to be considered
independently when applying the given filter.filter
- the filter that will be applied to each value, separately, of the specified nested object field.public CompositeDocumentTypeField getNestedObjectField()
nested object
field whose values are to be considered independently
when applying the filter available at getFilter()
.public ISearchQueryFilter getFilter()
getNestedObjectField()
.LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.