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 TypeMethodDescriptionboolean
clearSearchScroll
(SearchScrollContext scrollContext) Explicit clear the search scroll context, without waiting for the scroll keep alive to timeout.Gets the default repository name.default SearchIndex
Gets the defaultSearchIndex
for the default repository.getDefaultSearchIndexForRepository
(String repository) Gets the defaultSearchIndex
for a given repository.Gets the set of repository names.getSearchIndexForRepository
(String repository) Gets the list ofSearchIndex
for a given repository.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. -
getDefaultSearchIndex
Gets the defaultSearchIndex
for the default repository. -
getDefaultSearchIndexForRepository
Gets the defaultSearchIndex
for a given repository. -
getSearchIndexForRepository
Gets the list ofSearchIndex
for a given repository. -
search
Executes a search query.var response = searchService.search(SearchQuery.builder(session, "SELECT * FROM Document").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:
true
if the context is successfully cleared.
-