Class DiscriminatorMultiTenancyStrategy
java.lang.Object
org.hibernate.search.backend.elasticsearch.multitenancy.impl.DiscriminatorMultiTenancyStrategy
- All Implemented Interfaces:
MultiTenancyStrategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonObjectfilterOrNull(String tenantId) Generate a filter for the given tenant ID, to be applied to search queries.com.google.gson.JsonObjectfilterOrNull(Set<String> tenantIds) Generate a filter for the given tenant IDs, to be applied to search queries.org.hibernate.search.backend.elasticsearch.multitenancy.impl.DiscriminatorMultiTenancyStrategy.DiscriminatorMultiTenancyIdProjectionExtractionHelper
-
Constructor Details
-
DiscriminatorMultiTenancyStrategy
public DiscriminatorMultiTenancyStrategy()
-
-
Method Details
-
indexSchemaRootContributor
- Specified by:
indexSchemaRootContributorin interfaceMultiTenancyStrategy- Returns:
- A schema contributor for the required additional properties (tenant ID, ...), or an empty optional.
-
documentIdHelper
- Specified by:
documentIdHelperin interfaceMultiTenancyStrategy- Returns:
- A helper for creating predicates from tenant IDs.
-
documentMetadataContributor
- Specified by:
documentMetadataContributorin interfaceMultiTenancyStrategy- Returns:
- A metadata contributor for the required additional properties (tenant ID, ...), or an empty optional.
-
filterOrNull
Description copied from interface:MultiTenancyStrategyGenerate a filter for the given tenant ID, to be applied to search queries.- Specified by:
filterOrNullin interfaceMultiTenancyStrategy- Parameters:
tenantId- The tenant id.- Returns:
- The filter, or
nullif no filter is necessary.
-
filterOrNull
Description copied from interface:MultiTenancyStrategyGenerate a filter for the given tenant IDs, to be applied to search queries.- Specified by:
filterOrNullin interfaceMultiTenancyStrategy- Parameters:
tenantIds- The set of tenant ids.- Returns:
- The filter, or
nullif no filter is necessary.
-
idProjectionExtractionHelper
public org.hibernate.search.backend.elasticsearch.multitenancy.impl.DiscriminatorMultiTenancyStrategy.DiscriminatorMultiTenancyIdProjectionExtractionHelper idProjectionExtractionHelper()- Specified by:
idProjectionExtractionHelperin interfaceMultiTenancyStrategy- Returns:
- A helper for projections that need to extract the document id from search hits.
-