Project

General

Profile

« Previous | Next » 

Revision 8345

Added by Jing Tao about 11 years ago

Fixed a bug that when a data file was archived, the solr index for the metadata object still kept the "documents" element.

View differences:

metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/SolrIndex.java
609 609
                .getAllFieldValues(SolrElementField.FIELD_ISDOCUMENTEDBY);
610 610
        for (String documentedByValue : documentedBy) {
611 611
            SolrDoc solrDoc = ResourceMapSubprocessor.getSolrDoc(documentedByValue);
612
            solrDoc.removeFieldsWithValue(SolrElementField.FIELD_DOCUMENTS, documentedByValue);
612
            solrDoc.removeFieldsWithValue(SolrElementField.FIELD_DOCUMENTS, pid);
613 613
            //docsToUpdate.add(solrDoc);
614 614
            removeFromIndex(documentedByValue);
615 615
            insertToIndex(solrDoc);

Also available in: Unified diff