Skip to content

Commit

Permalink
Merge pull request #168 from AlexanderBlanchardAC/DIS-196-856-Indexin…
Browse files Browse the repository at this point in the history
…g-For-Records-With-Econtent

Dis 196 856 indexing for records with econtent
  • Loading branch information
AlexanderBlanchardAC authored Jan 17, 2025
2 parents d7a92bc + c775ade commit 8feb95f
Show file tree
Hide file tree
Showing 24 changed files with 18 additions and 7 deletions.
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 @@ -84,7 +84,7 @@ public class IndexingProfile extends BaseIndexingSettings {
private boolean hideOrderRecordsForBibsWithPhysicalItems;
private int orderRecordsToSuppressByDate;
private boolean checkSierraMatTypeForFormat;
private boolean index856Links;
private int index856Links;
private String treatUnknownAudienceAs;

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

this.checkSierraMatTypeForFormat = indexingProfileRS.getBoolean("checkSierraMatTypeForFormat");

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

//Custom Facet 1
Expand Down Expand Up @@ -1093,11 +1093,11 @@ public void setOrderStatusSubfield(char orderStatusSubfield) {
this.orderStatusSubfield = orderStatusSubfield;
}

public boolean isIndex856Links() {
public int getIndex856Links() {
return index856Links;
}

public void setIndex856Links(boolean index856Links) {
public void setIndex856Links(int index856Links) {
this.index856Links = index856Links;
}

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 @@ -1386,7 +1386,11 @@ 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()) {
if (settings.getIndex856Links() == 1 || settings.getIndex856Links() == 2) {
boolean hasEContentItems = !mainRecordInfo.getRelatedItems().isEmpty() && mainRecordInfo.getRelatedItems().stream().anyMatch(curItem->curItem.isEContent());
if (settings.getIndex856Links() == 2 && 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: 2 additions & 0 deletions code/web/release_notes/25.02.00.MD
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
//james

//alexander
### Indexing Updates
- Add the option of only indexing records by the 856 field if the record does not have eContent items. (*AB*)

//chloe
### WebBuilder Updates
Expand Down
9 changes: 7 additions & 2 deletions code/web/sys/Indexing/IndexingProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -838,10 +838,15 @@ static function getObjectStructure($context = ''): array {
'properties' => [
'index856Links' => [
'property' => 'index856Links',
'type' => 'checkbox',
'type' => 'enum',
'label' => 'Index 856 links',
'values' => [
0 => 'None',
1 => 'Always',
2 => 'Only When No eContent Items Are Found'
],
'description' => 'Whether or not 856 links with a first indicator of 4 and second indicator of 0 or 1 are indexed and treated as items.',
'defaultValue' => false,
'defaultValue' => 0,
'hideInLists' => true,
'forcesReindex' => true,
],
Expand Down
Binary file modified code/web_indexer/web_indexer.jar
Binary file not shown.

0 comments on commit 8feb95f

Please sign in to comment.