From ee986d59dd04643b8d007c8c39d1e0cc6be21b1e Mon Sep 17 00:00:00 2001 From: Leonid Andreev Date: Mon, 24 Jun 2024 15:58:13 -0400 Subject: [PATCH 1/4] A quick fix for #10611. --- .../harvard/iq/dataverse/search/IndexServiceBean.java | 8 +++++++- .../harvard/iq/dataverse/search/SearchServiceBean.java | 5 ++--- .../edu/harvard/iq/dataverse/settings/FeatureFlags.java | 9 +++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/search/IndexServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/search/IndexServiceBean.java index 0102459ab9f..d3286d3be4b 100644 --- a/src/main/java/edu/harvard/iq/dataverse/search/IndexServiceBean.java +++ b/src/main/java/edu/harvard/iq/dataverse/search/IndexServiceBean.java @@ -888,8 +888,14 @@ public SolrInputDocuments toSolrDocs(IndexableDataset indexableDataset, Set Date: Tue, 25 Jun 2024 19:13:32 -0400 Subject: [PATCH 2/4] optional indexing of the "metadata source" for harvested files as well - it appears that it may have been missed in the original #10464 (? - will confirm). #10611 --- .../harvard/iq/dataverse/search/IndexServiceBean.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/search/IndexServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/search/IndexServiceBean.java index d3286d3be4b..1eaf012876d 100644 --- a/src/main/java/edu/harvard/iq/dataverse/search/IndexServiceBean.java +++ b/src/main/java/edu/harvard/iq/dataverse/search/IndexServiceBean.java @@ -1402,7 +1402,14 @@ public SolrInputDocuments toSolrDocs(IndexableDataset indexableDataset, Set Date: Tue, 25 Jun 2024 19:32:53 -0400 Subject: [PATCH 3/4] a release note (#10611) --- doc/release-notes/10611-harvested-origin-facet.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/release-notes/10611-harvested-origin-facet.md diff --git a/doc/release-notes/10611-harvested-origin-facet.md b/doc/release-notes/10611-harvested-origin-facet.md new file mode 100644 index 00000000000..89ab6eb7639 --- /dev/null +++ b/doc/release-notes/10611-harvested-origin-facet.md @@ -0,0 +1,10 @@ +NOTE that this release note supercedes the 10464-add-name-harvesting-client-facet.md note from the PR 10464. + +An option has been added to index the name of the Harvesting Client as the "Metadata Source" of harvested datasets and files; if enabled, the Metadata Source facet will be showing separate entries for the content harvested from different sources, instead of the current, default behavior where there is one "Harvested" facet for all such content. + + +TODO: for the v6.3 release note: +If you choose to enable the extended "Metadata Souce" facet for harvested content, set the optional feature flage (jvm option) `dataverse.feature.index-harvested-metadata-source=true` before reindexing. + +[Please note that the upgrade instruction in 6.3 will contain a suggestion to run full reindex, as part of the Solr upgrade, so the sentence above will need to be added to that section] + From bb7944928942a683718d93900775f7c1535f3609 Mon Sep 17 00:00:00 2001 From: Leonid Andreev Date: Tue, 25 Jun 2024 19:39:51 -0400 Subject: [PATCH 4/4] an entry in the config guide for the new feature flag. --- doc/sphinx-guides/source/installation/config.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/sphinx-guides/source/installation/config.rst b/doc/sphinx-guides/source/installation/config.rst index 213ac827819..4b2542f45fd 100644 --- a/doc/sphinx-guides/source/installation/config.rst +++ b/doc/sphinx-guides/source/installation/config.rst @@ -3274,6 +3274,9 @@ please find all known feature flags below. Any of these flags can be activated u * - add-publicobject-solr-field - Adds an extra boolean field `PublicObject_b:true` for public content (published Collections, Datasets and Files). Once reindexed with these fields, we can rely on it to remove a very expensive Solr join on all such documents in Solr queries, significantly improving overall performance (by enabling the feature flag above, `avoid-expensive-solr-join`). These two flags are separate so that an instance can reindex their holdings before enabling the optimization in searches, thus avoiding having their public objects temporarily disappear from search results while the reindexing is in progress. - ``Off`` + * - index-harvested-metadata-source + - If enabled, this will index the name of the Harvesting Client as the "Metadata Source" of harvested datasets and files; so that the Metadata Source facet on the collection page will be showing separate entries for the content harvested from different sources/via different clients, instead of the current, default behavior where there is one "Harvested" facet for all such content. Requires a reindex. + - ``Off`` **Note:** Feature flags can be set via any `supported MicroProfile Config API source`_, e.g. the environment variable ``DATAVERSE_FEATURE_XXX`` (e.g. ``DATAVERSE_FEATURE_API_SESSION_AUTH=1``). These environment variables can be set in your shell before starting Payara. If you are using :doc:`Docker for development `, you can set them in the `docker compose `_ file.