Package org.nuxeo.ecm.core.search
Interface SearchService
- All Known Implementing Classes:
SearchServiceImpl
public interface SearchService
A Service to search on Nuxeo repositories.
- Since:
- 2025.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanclearSearchScroll(SearchScrollContext scrollContext) Explicit clear the search scroll context, without waiting for the scroll keep alive to timeout.default StringGets the default index for the default repository.getDefaultIndexName(String repository) Gets the default index for the given repository.Gets the default repository name.default SearchIndexDeprecated, for removal: This API element is subject to removal in a future version.getDefaultSearchIndexForRepository(String repository) Deprecated, for removal: This API element is subject to removal in a future version.since 2025.1, usegetDefaultIndexName(String)instead.getIndexNames(String repository) Gets all available indexes for a repository.Gets the set of repository names.getSearchIndex(String indexName) Gets the SearchIndex for the given index name.getSearchIndexForRepository(String repository) Deprecated, for removal: This API element is subject to removal in a future version.since 2025.1, usegetIndexNames(String)instead.search(SearchQuery query) Executes a search query.searchScroll(SearchScrollContext scrollContext) Iterate on results for a scroll search.
-
Method Details
-
getDefaultRepositoryName
String getDefaultRepositoryName()Gets the default repository name. -
getRepositoryNames
Gets the set of repository names. -
getDefaultIndexName
Gets the default index for the default repository.- Since:
- 2025.1
-
getDefaultIndexName
Gets the default index for the given repository.- Since:
- 2025.1
-
getIndexNames
Gets all available indexes for a repository.- Since:
- 2025.1
-
getSearchIndex
Gets the SearchIndex for the given index name.- Throws:
NullPointerException- if indexName is unknown.- Since:
- 2025.1
-
getDefaultSearchIndex
Deprecated, for removal: This API element is subject to removal in a future version.since 2025.1, usegetDefaultIndexName()instead.Gets the defaultSearchIndexfor the default repository. -
getDefaultSearchIndexForRepository
@Deprecated(since="2025.1", forRemoval=true) SearchIndex getDefaultSearchIndexForRepository(String repository) Deprecated, for removal: This API element is subject to removal in a future version.since 2025.1, usegetDefaultIndexName(String)instead.Gets the defaultSearchIndexfor a given repository. -
getSearchIndexForRepository
@Deprecated(since="2025.1", forRemoval=true) List<SearchIndex> getSearchIndexForRepository(String repository) Deprecated, for removal: This API element is subject to removal in a future version.since 2025.1, usegetIndexNames(String)instead.Gets the list ofSearchIndexfor a given repository. -
search
Executes a search query.var response = searchService.search(SearchQuery.builder("SELECT * FROM Document", session).build());- Throws:
QueryParseException- if the NXQL query is invalidRetryableException- if search client cannot access the search backendSearchClientException- if search client is not able to process the query
-
searchScroll
Iterate on results for a scroll search. The end of scroll is reached when there is no more hit, i.e.SearchResponse.getHitsCount()returns0.- Parameters:
scrollContext- provided by the previousSearchResponse.getScrollContext();
-
clearSearchScroll
Explicit clear the search scroll context, without waiting for the scroll keep alive to timeout.- Returns:
trueif the context is successfully cleared.
-
getDefaultIndexName()instead.