|
12 | 12 | import edu.harvard.iq.dataverse.datavariable.VariableMetadataUtil;
|
13 | 13 | import edu.harvard.iq.dataverse.datavariable.VariableServiceBean;
|
14 | 14 | import edu.harvard.iq.dataverse.harvest.client.HarvestingClient;
|
| 15 | +import edu.harvard.iq.dataverse.settings.FeatureFlags; |
15 | 16 | import edu.harvard.iq.dataverse.settings.JvmSettings;
|
16 | 17 | import edu.harvard.iq.dataverse.settings.SettingsServiceBean;
|
17 | 18 | import edu.harvard.iq.dataverse.util.FileUtil;
|
@@ -214,6 +215,9 @@ public Future<String> indexDataverse(Dataverse dataverse, boolean processPaths)
|
214 | 215 | solrInputDocument.addField(SearchFields.DATAVERSE_CATEGORY, dataverse.getIndexableCategoryName());
|
215 | 216 | if (dataverse.isReleased()) {
|
216 | 217 | solrInputDocument.addField(SearchFields.PUBLICATION_STATUS, PUBLISHED_STRING);
|
| 218 | + if (FeatureFlags.AVOID_EXPENSIVE_SOLR_JOIN.enabled()) { |
| 219 | + solrInputDocument.addField(SearchFields.PUBLIC_OBJECT, true); |
| 220 | + } |
217 | 221 | solrInputDocument.addField(SearchFields.RELEASE_OR_CREATE_DATE, dataverse.getPublicationDate());
|
218 | 222 | } else {
|
219 | 223 | solrInputDocument.addField(SearchFields.PUBLICATION_STATUS, UNPUBLISHED_STRING);
|
@@ -887,6 +891,9 @@ public SolrInputDocuments toSolrDocs(IndexableDataset indexableDataset, Set<Long
|
887 | 891 |
|
888 | 892 | if (state.equals(indexableDataset.getDatasetState().PUBLISHED)) {
|
889 | 893 | solrInputDocument.addField(SearchFields.PUBLICATION_STATUS, PUBLISHED_STRING);
|
| 894 | + if (FeatureFlags.AVOID_EXPENSIVE_SOLR_JOIN.enabled()) { |
| 895 | + solrInputDocument.addField(SearchFields.PUBLIC_OBJECT, true); |
| 896 | + } |
890 | 897 | // solrInputDocument.addField(SearchFields.RELEASE_OR_CREATE_DATE,
|
891 | 898 | // dataset.getPublicationDate());
|
892 | 899 | } else if (state.equals(indexableDataset.getDatasetState().WORKING_COPY)) {
|
@@ -1400,6 +1407,9 @@ public SolrInputDocuments toSolrDocs(IndexableDataset indexableDataset, Set<Long
|
1400 | 1407 | if (indexableDataset.getDatasetState().equals(indexableDataset.getDatasetState().PUBLISHED)) {
|
1401 | 1408 | fileSolrDocId = solrDocIdentifierFile + fileEntityId;
|
1402 | 1409 | datafileSolrInputDocument.addField(SearchFields.PUBLICATION_STATUS, PUBLISHED_STRING);
|
| 1410 | + if (FeatureFlags.AVOID_EXPENSIVE_SOLR_JOIN.enabled()) { |
| 1411 | + solrInputDocument.addField(SearchFields.PUBLIC_OBJECT, true); |
| 1412 | + } |
1403 | 1413 | // datafileSolrInputDocument.addField(SearchFields.PERMS, publicGroupString);
|
1404 | 1414 | addDatasetReleaseDateToSolrDoc(datafileSolrInputDocument, dataset);
|
1405 | 1415 | // has this published file been deleted from the current draft version?
|
|
0 commit comments