solr migration button
This commit is contained in:
@@ -291,8 +291,14 @@ public class SolrService {
|
||||
|
||||
// Add library ID for multi-tenant separation
|
||||
String currentLibraryId = getCurrentLibraryId();
|
||||
if (currentLibraryId != null) {
|
||||
doc.addField("libraryId", currentLibraryId);
|
||||
try {
|
||||
if (currentLibraryId != null) {
|
||||
doc.addField("libraryId", currentLibraryId);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// If libraryId field doesn't exist, log warning and continue without it
|
||||
// This allows indexing to work even if schema migration hasn't completed
|
||||
logger.warn("Could not add libraryId field to document (field may not exist in schema): {}", e.getMessage());
|
||||
}
|
||||
|
||||
return doc;
|
||||
@@ -330,8 +336,14 @@ public class SolrService {
|
||||
|
||||
// Add library ID for multi-tenant separation
|
||||
String currentLibraryId = getCurrentLibraryId();
|
||||
if (currentLibraryId != null) {
|
||||
doc.addField("libraryId", currentLibraryId);
|
||||
try {
|
||||
if (currentLibraryId != null) {
|
||||
doc.addField("libraryId", currentLibraryId);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// If libraryId field doesn't exist, log warning and continue without it
|
||||
// This allows indexing to work even if schema migration hasn't completed
|
||||
logger.warn("Could not add libraryId field to document (field may not exist in schema): {}", e.getMessage());
|
||||
}
|
||||
|
||||
return doc;
|
||||
|
||||
Reference in New Issue
Block a user