Package org.elasticsearch.join.mapper
Class Joiner
java.lang.Object
org.elasticsearch.join.mapper.Joiner
Utility class to help build join queries and aggregations, based on a join_field
-
Method Summary
Modifier and TypeMethodDescriptionchildJoinField
(String parentType) org.apache.lucene.search.Query
childrenFilter
(String parentType) boolean
childTypeExists
(String type) org.apache.lucene.search.Query
static Joiner
getJoiner
(SearchExecutionContext context) Get the Joiner for this context, ornull
if none is configuredstatic Joiner
getJoiner
(AggregationContext context) Get the Joiner for this context, ornull
if none is configuredboolean
knownRelation
(String type) org.apache.lucene.search.Query
parentFilter
(String childType) parentJoinField
(String childType) boolean
parentTypeExists
(String type)
-
Method Details
-
getJoiner
Get the Joiner for this context, ornull
if none is configured -
getJoiner
Get the Joiner for this context, ornull
if none is configured -
getJoinField
- Returns:
- the join field for the index
-
filter
- Returns:
- a filter for documents of a specific join type
-
parentFilter
- Returns:
- a filter for parent documents of a specific child type
-
childrenFilter
- Returns:
- a filter for child documents of a specific parent type
-
childTypeExists
- Returns:
true
if the child type has been defined for the join field
-
parentTypeExists
- Returns:
true
if the parent type has been defined for the join field
-
knownRelation
- Returns:
true
if the type has been defined as either a parent or a child for the join field
-
parentJoinField
- Returns:
- the name of the linked join field for documents of a specific child type
-
childJoinField
- Returns:
- the name of the linked join field for documents of a specific parent type
-