replacing opensearch with solr
This commit is contained in:
@@ -493,11 +493,11 @@ async function processIndividualMode(
|
||||
|
||||
console.log(`Bulk import completed: ${importedCount} imported, ${skippedCount} skipped, ${errorCount} errors`);
|
||||
|
||||
// Trigger OpenSearch reindex if any stories were imported
|
||||
// Trigger Solr reindex if any stories were imported
|
||||
if (importedCount > 0) {
|
||||
try {
|
||||
console.log('Triggering OpenSearch reindex after bulk import...');
|
||||
const reindexUrl = `http://backend:8080/api/admin/search/opensearch/reindex`;
|
||||
console.log('Triggering Solr reindex after bulk import...');
|
||||
const reindexUrl = `http://backend:8080/api/admin/search/solr/reindex`;
|
||||
const reindexResponse = await fetch(reindexUrl, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@@ -508,12 +508,12 @@ async function processIndividualMode(
|
||||
|
||||
if (reindexResponse.ok) {
|
||||
const reindexResult = await reindexResponse.json();
|
||||
console.log('OpenSearch reindex completed:', reindexResult);
|
||||
console.log('Solr reindex completed:', reindexResult);
|
||||
} else {
|
||||
console.warn('OpenSearch reindex failed:', reindexResponse.status);
|
||||
console.warn('Solr reindex failed:', reindexResponse.status);
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('Failed to trigger OpenSearch reindex:', error);
|
||||
console.warn('Failed to trigger Solr reindex:', error);
|
||||
// Don't fail the whole request if reindex fails
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user