Class NestedObjectFilter
- java.lang.Object
-
- lumis.portal.bigdata.query.NestedObjectFilter
-
- All Implemented Interfaces:
ISearchQueryFilter
@StableMinor(version="14.0", sinceVersion="8.2") public class NestedObjectFilter extends Object implements ISearchQueryFilter
Filter used to apply other filter in a single nested object. The filter given to be applied in a nested object must use only fields that exist inside the data hierarchy of the nested object field. When a filter applied to a nested object with this filter, it will only consider fields within the same nested object instance when filtering the field values.For example, if a document has a field with
dataType
=DocumentTypeField.DataType.NESTED_OBJECT
andlist
=true
with the following values:- nested
- Nested Value 1
- field1="A"
- field2="B"
- Nested Value 2
- field1="X"
- field2="Z"
- Nested Value 1
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 aNestedObjectFilter
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 anotherNestedObjectFilter
. 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.- Since:
- 8.2.0
- Version:
- $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
-
-
Constructor Summary
Constructors Constructor Description NestedObjectFilter(CompositeDocumentTypeField nestedObjectField, ISearchQueryFilter filter)
Creates a newNestedObjectFilter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ISearchQueryFilter
getFilter()
Returns the filter that will be applied to each value, separately, of the nested object field available atgetNestedObjectField()
.CompositeDocumentTypeField
getNestedObjectField()
Returns thenested object
field whose values are to be considered independently when applying the filter available atgetFilter()
.
-
-
-
Constructor Detail
-
NestedObjectFilter
public NestedObjectFilter(CompositeDocumentTypeField nestedObjectField, ISearchQueryFilter filter)
Creates a newNestedObjectFilter
.- Parameters:
nestedObjectField
- thenested 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.- Since:
- 8.2.0
-
-
Method Detail
-
getNestedObjectField
public CompositeDocumentTypeField getNestedObjectField()
Returns thenested object
field whose values are to be considered independently when applying the filter available atgetFilter()
.- Returns:
- the nested object field.
- Since:
- 8.2.0
-
getFilter
public ISearchQueryFilter getFilter()
Returns the filter that will be applied to each value, separately, of the nested object field available atgetNestedObjectField()
.- Returns:
- the filter.
- Since:
- 8.2.0
-
-