mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
[MNT-20449] Copy MINHASH from cached doc (if exists)
This commit is contained in:
+5
@@ -145,6 +145,7 @@ import org.apache.lucene.util.BytesRefBuilder;
|
||||
import org.apache.solr.common.SolrDocument;
|
||||
import org.apache.solr.common.SolrDocumentList;
|
||||
import org.apache.solr.common.SolrInputDocument;
|
||||
import org.apache.solr.common.SolrInputField;
|
||||
import org.apache.solr.common.params.CommonParams;
|
||||
import org.apache.solr.common.params.FacetParams;
|
||||
import org.apache.solr.common.params.ModifiableSolrParams;
|
||||
@@ -2352,6 +2353,10 @@ public class SolrInformationServer implements InformationServer
|
||||
|
||||
if (cachedDoc != null)
|
||||
{
|
||||
ofNullable(cachedDoc.getField("MINHASH"))
|
||||
.map(SolrInputField::getValue)
|
||||
.ifPresent(minHash -> newDoc.setField("MINHASH", minHash));
|
||||
|
||||
// Builds up the new solr doc from the cached content regardless of whether or not it is current
|
||||
List<FieldInstance> fields = AlfrescoSolrDataModel.getInstance().getIndexedFieldNamesForProperty(
|
||||
propertyQName).getFields();
|
||||
|
||||
Reference in New Issue
Block a user