public interface IndexFamily
IndexFamily represents a set of indexes using the same indexing technology
and the same "global" configuration (e.g. the host for the Elasticsearch).
It actually contains information derived from the configuration and mapping,
thus it cannot be accessed directly through static methods.
However, it can be retrieved through the SearchFactory by passing an IndexFamilyType as a key.
As it happens, in Search 5, it is not possible to have multiple sets of "global" configuration per technology;
thus there will only ever be one instance of IndexFamily per technology,
i.e. there will always be a 1-1 mapping between IndexFamilyType and IndexFamily.
In future versions of Hibernate Search, we plan to allow multiple configurations per technology, thus this 1-1 mapping may not hold.
Ideally this class would be called a "Backend" or "BackendManager", but in Search 5 the term "backend" already means something subtly different, related to the routing of works (locally, through JGroups, ...).
| Modifier and Type | Method and Description |
|---|---|
<T> T |
unwrap(Class<T> unwrappedClass)
Unwrap the index family to some implementation-specific type.
|
<T> T unwrap(Class<T> unwrappedClass)
unwrappedClass - The Class representing the expected index family typeSearchException - if the index family implementation does not support
unwrapping to the given class.Copyright © 2006-2023 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.