Interface TypedSearchPredicateFactory<SR>

Type Parameters:
SR - Scope root type.
All Superinterfaces:
SearchPredicateFactory
All Known Subinterfaces:
ElasticsearchSearchPredicateFactory<SR>, ExtendedSearchPredicateFactory<SR,S>, LuceneSearchPredicateFactory<SR>
All Known Implementing Classes:
AbstractSearchPredicateFactory

public interface TypedSearchPredicateFactory<SR> extends SearchPredicateFactory
A factory for search predicates.

This is the main entry point to the predicate DSL.

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 predicate on different object fields that have same structure (same sub-fields).

Such a factory can also transform relative paths into absolute paths using toAbsolutePath(String); this can be useful for native predicates 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.