public interface SearchSession extends AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Execute any pending work in the
main work plan
and release any resource held by this session. |
SearchWorkPlan |
getMainWorkPlan() |
default SearchScope |
scope(Class<?> type)
Create a
SearchScope limited to the given type. |
SearchScope |
scope(Collection<? extends Class<?>> types)
Create a
SearchScope limited to the given types. |
default SearchQueryResultDefinitionContext |
search(Class<?> type)
Initiate the building of a search query.
|
default SearchQueryResultDefinitionContext |
search(Collection<? extends Class<?>> types)
Initiate the building of a search query.
|
void close()
main work plan
and release any resource held by this session.close in interface AutoCloseabledefault SearchQueryResultDefinitionContext search(Class<?> type)
The query will target the indexes mapped to the given type, or to any of its sub-types.
type - An indexed type, or a supertype of all indexed types that will be targeted by the search query.get the resulting query.SearchQueryResultDefinitionContextdefault SearchQueryResultDefinitionContext search(Collection<? extends Class<?>> types)
The query will target the indexes mapped to the given types, or to any of their sub-types.
types - A collection of indexed types, or supertypes of all indexed types that will be targeted by the search query.get the resulting query.SearchQueryResultDefinitionContextdefault SearchScope scope(Class<?> type)
SearchScope limited to the given type.type - A type to include in the scope.SearchScopeSearchScope scope(Collection<? extends Class<?>> types)
SearchScope limited to the given types.types - A collection of types to include in the scope.SearchScopeSearchWorkPlan getMainWorkPlan()
Copyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.