Interface SearchService

All Known Implementing Classes:
SearchServiceImpl

public interface SearchService
A Service to search on Nuxeo repositories.
Since:
2025.0
  • Method Details

    • getDefaultRepositoryName

      String getDefaultRepositoryName()
      Gets the default repository name.
    • getRepositoryNames

      Set<String> getRepositoryNames()
      Gets the set of repository names.
    • getDefaultSearchIndex

      default SearchIndex getDefaultSearchIndex()
      Gets the default SearchIndex for the default repository.
    • getDefaultSearchIndexForRepository

      SearchIndex getDefaultSearchIndexForRepository(String repository)
      Gets the default SearchIndex for a given repository.
    • getSearchIndexForRepository

      List<SearchIndex> getSearchIndexForRepository(String repository)
      Gets the list of SearchIndex for a given repository.
    • search

      SearchResponse search(SearchQuery query)
      Executes a search query.
      var response = searchService.search(SearchQuery.builder(session, "SELECT * FROM Document").build());
      
      Throws:
      QueryParseException - if the NXQL query is invalid
      RetryableException - if search client cannot access the search backend
      SearchClientException - if search client is not able to process the query
    • searchScroll

      SearchResponse searchScroll(SearchScrollContext scrollContext)
      Iterate on results for a scroll search. The end of scroll is reached when there is no more hit, i.e. SearchResponse.getHitsCount() returns 0.
      Parameters:
      scrollContext - provided by the previous SearchResponse.getScrollContext();
    • clearSearchScroll

      boolean clearSearchScroll(SearchScrollContext scrollContext)
      Explicit clear the search scroll context, without waiting for the scroll keep alive to timeout.
      Returns:
      true if the context is successfully cleared.