Package org.nuxeo.ecm.core.search
Interface SearchIndexingService
- All Known Implementing Classes:
SearchServiceImpl
public interface SearchIndexingService
Service responsible for managing search index operations including indexing, reindexing, and refreshing documents.
This service is primarily intended for internal usage as document indexing typically occurs automatically.
- Since:
- 2025.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanWaits for completion of all indexing activities.Internal: Retrieves a search client by name.indexDocuments(BulkIndexingRequest request) Internal: Indexes documents according to the specified bulk indexing request.voidrefresh(SearchIndex index) Refreshes a search index to make newly indexed documents immediately searchable.default StringreindexDocuments(String repository, String nxql) Reindexes documents matching the specified NXQL query for all search indexes in the repository.reindexDocuments(String repository, String nxql, long queryLimit) Reindexes documents matching the specified NXQL query up to the given limit for all search indexes of the repository.reindexDocuments(String repository, String nxql, long queryLimit, List<String> indexNames) Reindexes documents matching the specified NXQL query for the given limit only for the specified indexes.reindexRepository(String repository) Internal: Reindexes the entire repository by dropping and recreating all associated search indexes.reindexRepository(String repository, List<String> indexNames) Internal: Reindexes the entire repository by dropping and recreating the given search indexes.
-
Method Details
-
indexDocuments
Internal: Indexes documents according to the specified bulk indexing request.- Parameters:
request- the bulk indexing request containing documents to index- Returns:
- the indexing response with operation details
-
reindexRepository
Internal: Reindexes the entire repository by dropping and recreating all associated search indexes.- Parameters:
repository- the repository name- Returns:
- the bulk command id for the reindexing operation
-
reindexRepository
Internal: Reindexes the entire repository by dropping and recreating the given search indexes.- Parameters:
indexNames- the list of indexes to reindex, all indexes must be on the same repository- Returns:
- the bulk command id for the reindexing operation
- Since:
- 2025.11
-
reindexDocuments
Reindexes documents matching the specified NXQL query for all search indexes in the repository.- Parameters:
repository- the repository namenxql- the NXQL query to select documents- Returns:
- the bulk command id for the reindexing operation
-
reindexDocuments
Reindexes documents matching the specified NXQL query up to the given limit for all search indexes of the repository.- Parameters:
repository- the repository namenxql- the NXQL query to select documentsqueryLimit- maximum number of documents to index, or -1 for no limit- Returns:
- the bulk command id for the reindexing operation
- Since:
- 2025.8
-
reindexDocuments
Reindexes documents matching the specified NXQL query for the given limit only for the specified indexes.- Parameters:
repository- the repository namenxql- the NXQL query to select documentsqueryLimit- maximum number of documents to index, or -1 for no limitindexNames- search indexes to reindex, all search indexes must point to the same repository- Returns:
- the bulk command id for the reindexing operation
- Since:
- 2025.11
-
refresh
Refreshes a search index to make newly indexed documents immediately searchable.- Parameters:
index- the search index to refresh
-
getClient
Internal: Retrieves a search client by name.- Parameters:
clientName- the name of the search client- Returns:
- the search client instance
-
await
Waits for completion of all indexing activities. Intended for testing purposes only.- Parameters:
duration- the maximum duration to wait- Returns:
trueif all indexing operations completed,falseif timeout occurred- Throws:
InterruptedException- if the current thread is interrupted while waiting
-