Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dis 196 indexing 856 for records with e content #163

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified code/axis_360_export/axis_360_export.jar
Binary file not shown.
Binary file modified code/carlx_export/carlx_export.jar
Binary file not shown.
Binary file modified code/cloud_library_export/cloud_library_export.jar
Binary file not shown.
Binary file modified code/course_reserves_indexer/course_reserves_indexer.jar
Binary file not shown.
Binary file modified code/cron/cron.jar
Binary file not shown.
Binary file modified code/events_indexer/events_indexer.jar
Binary file not shown.
Binary file modified code/evergreen_export/evergreen_export.jar
Binary file not shown.
Binary file modified code/evolve_export/evolve_export.jar
Binary file not shown.
Binary file modified code/hoopla_export/hoopla_export.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public class IndexingProfile extends BaseIndexingSettings {
private int orderRecordsToSuppressByDate;
private boolean checkSierraMatTypeForFormat;
private boolean index856Links;
private boolean index856LinkOnlyIfNoEcontentRecord;
private String treatUnknownAudienceAs;

//Fields for loading order information
Expand Down Expand Up @@ -263,6 +264,7 @@ public IndexingProfile(String serverName, ResultSet indexingProfileRS, Connectio

index856Links = indexingProfileRS.getBoolean("index856Links");
treatUnknownAudienceAs = indexingProfileRS.getString("treatUnknownAudienceAs");
index856LinkOnlyIfNoEcontentRecord = indexingProfileRS.getBoolean("index856LinkOnlyIfNoEcontentRecord");

//Custom Facet 1
this.customFacet1SourceField = indexingProfileRS.getString("customFacet1SourceField");
Expand Down Expand Up @@ -1106,6 +1108,14 @@ public void setIndex856Links(boolean index856Links) {
this.index856Links = index856Links;
}

public boolean isIndex856LinkOnlyIfNoEcontentRecord() {
return index856LinkOnlyIfNoEcontentRecord;
}

public void setIndex856LinkOnlyIfNoEcontentRecord() {
this.index856LinkOnlyIfNoEcontentRecord = index856LinkOnlyIfNoEcontentRecord;
}

public String getTreatUnknownAudienceAs() {
return treatUnknownAudienceAs;
}
Expand Down
Binary file modified code/koha_export/koha_export.jar
Binary file not shown.
Binary file modified code/oai_indexer/oai_indexer.jar
Binary file not shown.
Binary file modified code/overdrive_extract/overdrive_extract.jar
Binary file not shown.
Binary file modified code/palace_project_export/palace_project_export.jar
Binary file not shown.
Binary file modified code/polaris_export/polaris_export.jar
Binary file not shown.
Binary file modified code/reindexer/reindexer.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -1387,6 +1387,10 @@ protected String getItemStatus(DataField itemField, String recordIdentifier){
protected List<RecordInfo> loadUnsuppressedEContentItems(AbstractGroupedWorkSolr groupedWork, String identifier, org.marc4j.marc.Record record, StringBuilder suppressionNotes, RecordInfo mainRecordInfo, boolean hasParentRecord, boolean hasChildRecords){
List<RecordInfo> unsuppressedEcontentRecords = new ArrayList<>();
if (settings.isIndex856Links()) {
boolean hasEContentItems = !mainRecordInfo.getRelatedItems().isEmpty() && mainRecordInfo.getRelatedItems().stream().anyMatch(curItem->curItem.isEContent());
if (settings.isIndex856LinkOnlyIfNoEcontentRecord() && hasEContentItems) {
return unsuppressedEcontentRecords;
}
List<DataField> recordUrls = MarcUtil.getDataFields(record, 856);
if (recordUrls.isEmpty()) {
return unsuppressedEcontentRecords;
Expand Down
Binary file modified code/sideload_processing/sideload_processing.jar
Binary file not shown.
Binary file modified code/sierra_export_api/sierra_export_api.jar
Binary file not shown.
Binary file modified code/symphony_export/symphony_export.jar
Binary file not shown.
Binary file modified code/user_list_indexer/user_list_indexer.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion code/web/interface/themes/responsive/js/aspen.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ AspenDiscovery.IndexingClass = (function () {
'propertyRowtranslationMaps', 'FloatingSave', 'propertyRowindex856Links', 'propertyRowincludePersonalAndCorporateNamesInTopics',
'propertyRowcustomFacetSection', 'propertyRowcustomFacet1SourceField', 'propertyRowcustomFacet1ValuesToInclude', 'propertyRowcustomFacet1ValuesToExclude',
'propertyRowcustomFacet2SourceField', 'propertyRowcustomFacet2ValuesToInclude', 'propertyRowcustomFacet2ValuesToExclude',
'propertyRowcustomFacet3SourceField', 'propertyRowcustomFacet3ValuesToInclude', 'propertyRowcustomFacet3ValuesToExclude'
'propertyRowcustomFacet3SourceField', 'propertyRowcustomFacet3ValuesToInclude', 'propertyRowcustomFacet3ValuesToExclude', 'propertyRowindex856LinkOnlyIfNoEcontentRecord'
],
//Specific per class
Koha: ['propertyRowlastUpdateOfAuthorities'],
Expand Down
2 changes: 2 additions & 0 deletions code/web/release_notes/25.02.00.MD
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
//james

//alexander
### Indexing Updates
- Add an option in the Indexing Profile to only index records by their 856 field if they do not contain any items that are treated as eContent. (*AB*)

//chloe
### WebBuilder Updates
Expand Down
10 changes: 9 additions & 1 deletion code/web/sys/DBMaintenance/version_updates/25.02.00.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function getUpdates25_02_00(): array {
'ALTER TABLE two_factor_auth_settings ADD COLUMN accountProfileId INT',
"UPDATE two_factor_auth_settings set accountProfileId = (SELECT MIN(id) from account_profiles where ils <> 'na' and name <> 'admin')"
]
]
],

//katherine

Expand All @@ -59,6 +59,14 @@ function getUpdates25_02_00(): array {
//kodi

//alexander - PTFS-Europe
'indexing_records_with_econtent' => [
'title' => 'Indexing Records With Econtent',
'description' => 'Whether records with eContent as an item should also index via 856 field.',
'continueOnError' => true,
'sql' => [
'ALTER TABLE indexing_profiles ADD COLUMN index856LinkOnlyIfNoEcontentRecord TINYINT(1) NOT NULL DEFAULT 0'
],
],

//chloe - PTFS-Europe

Expand Down
14 changes: 13 additions & 1 deletion code/web/sys/Indexing/IndexingProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ class IndexingProfile extends DataObject {

public $evergreenOrgUnitSchema;
public $index856Links;
public $index856LinkOnlyIfNoEcontentRecord;
public /** @noinspection PhpUnused */ $includePersonalAndCorporateNamesInTopics;

public $orderRecordsStatusesToInclude;
Expand Down Expand Up @@ -226,7 +227,8 @@ public function getNumericColumnNames(): array {
'orderRecordsToSuppressByDate',
'numRetriesForBibLookups',
'numMillisecondsToPauseAfterBibLookups',
'numExtractionThreads'
'numExtractionThreads',
'index856LinkOnlyIfNoEcontentRecord'
];
}

Expand Down Expand Up @@ -484,6 +486,16 @@ static function getObjectStructure($context = ''): array {
'forcesReindex' => true,
],

'index856LinkOnlyIfNoEcontentRecord' => [
'property' => 'index856LinkOnlyIfNoEcontentRecord',
'type' => 'checkbox',
'label' => 'Index 856 Links Only For Records Without eContent Items',
'description' => 'Whether or not records that have eContent items attached should be indexed by the 856 field when Index 856 Links is selected.',
'defaultValue' => false,
'hideInLists' => true,
'forcesReindex' => true,
],

'suppressRecordsWithUrlsMatching' => [
'property' => 'suppressRecordsWithUrlsMatching',
'hiddenByDefault' => true ,
Expand Down
Binary file modified code/web_indexer/web_indexer.jar
Binary file not shown.
Loading