mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-10-01 14:41:19 +00:00
[ SEARCH-1702 ] Content Tracker Fix
This commit is contained in:
@@ -1782,6 +1782,8 @@ public class SolrInformationServer implements InformationServer
|
|||||||
processor = this.core.getUpdateProcessingChain(null).createProcessor(request, newSolrQueryResponse());
|
processor = this.core.getUpdateProcessingChain(null).createProcessor(request, newSolrQueryResponse());
|
||||||
|
|
||||||
SolrInputDocument doc = new PartialSolrInputDocument();
|
SolrInputDocument doc = new PartialSolrInputDocument();
|
||||||
|
doc.removeField(FIELD_SOLR4_ID);
|
||||||
|
doc.addField(FIELD_DBID, docRef.dbId);
|
||||||
doc.setField(FIELD_SOLR4_ID,
|
doc.setField(FIELD_SOLR4_ID,
|
||||||
AlfrescoSolrDataModel.getNodeDocumentId(
|
AlfrescoSolrDataModel.getNodeDocumentId(
|
||||||
docRef.tenant,
|
docRef.tenant,
|
||||||
@@ -2318,6 +2320,7 @@ public class SolrInformationServer implements InformationServer
|
|||||||
private static void markAsContentInSynch(SolrInputDocument document, Long id)
|
private static void markAsContentInSynch(SolrInputDocument document, Long id)
|
||||||
{
|
{
|
||||||
long contentVersionId = ofNullable(id).orElse(CONTENT_UPDATED_MARKER);
|
long contentVersionId = ofNullable(id).orElse(CONTENT_UPDATED_MARKER);
|
||||||
|
|
||||||
document.setField(LATEST_APPLIED_CONTENT_VERSION_ID, contentVersionId);
|
document.setField(LATEST_APPLIED_CONTENT_VERSION_ID, contentVersionId);
|
||||||
document.setField(LAST_INCOMING_CONTENT_VERSION_ID, contentVersionId);
|
document.setField(LAST_INCOMING_CONTENT_VERSION_ID, contentVersionId);
|
||||||
}
|
}
|
||||||
@@ -2479,11 +2482,13 @@ public class SolrInformationServer implements InformationServer
|
|||||||
this.getTrackerStats().addDocTransformationTime(System.nanoTime() - start);
|
this.getTrackerStats().addDocTransformationTime(System.nanoTime() - start);
|
||||||
|
|
||||||
dataModel.getIndexedFieldNamesForProperty(propertyQName).getFields()
|
dataModel.getIndexedFieldNamesForProperty(propertyQName).getFields()
|
||||||
|
.stream()
|
||||||
|
.peek(field -> doc.remove(field.getField()))
|
||||||
.forEach(field -> {
|
.forEach(field -> {
|
||||||
doc.addField(
|
doc.addField(
|
||||||
field.getField(),
|
field.getField(),
|
||||||
field.isLocalised()
|
field.isLocalised()
|
||||||
? Map.of("set", "\u0000" + locale + "\u0000" + textContent)
|
? "\u0000" + locale + "\u0000" + textContent
|
||||||
: textContent);
|
: textContent);
|
||||||
|
|
||||||
addFieldIfNotSet(doc, field.getField());
|
addFieldIfNotSet(doc, field.getField());
|
||||||
|
Reference in New Issue
Block a user