Interface TypedSearchAggregationFactory<SR>

Type Parameters:
SR - Scope root type.
All Superinterfaces:
SearchAggregationFactory
All Known Subinterfaces:
ElasticsearchSearchAggregationFactory<SR>, ExtendedSearchAggregationFactory<SR,S,PDF>, LuceneSearchAggregationFactory<SR>
All Known Implementing Classes:
AbstractSearchAggregationFactory

public interface TypedSearchAggregationFactory<SR> extends SearchAggregationFactory
A factory for search aggregations.

Field paths

By default, field paths passed to this DSL are interpreted as absolute, i.e. relative to the index root.

However, a new, "relative" factory can be created with withRoot(String): the new factory interprets paths as relative to the object field passed as argument to the method.

This can be useful when calling reusable methods that can apply the same aggregation on different object fields that have same structure (same sub-fields).

Such a factory can also transform relative paths into absolute paths using SearchAggregationFactory.toAbsolutePath(String); this can be useful for native aggregations in particular.

Field references

A field reference is always represented by the absolute field path and, if applicable, i.e. when a field reference is typed, a combination of the ValueModel and the type.

Field references are usually accessed from the generated Hibernate Search's static metamodel classes that describe the index structure. Such reference provides the information on which search capabilities the particular index field possesses, and allows switching between different value model representations.

Author:
Emmanuel Bernard emmanuel@hibernate.org