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

Handle transformation and solr indexing errors #269

Merged
merged 4 commits into from
Nov 26, 2024
Merged

Conversation

eliotjordan
Copy link
Member

@eliotjordan eliotjordan commented Nov 22, 2024

Work towards #268

  • Index documents one at a time after batch Solr update returns an error
  • Assign default value when title is missing
  • Resolves a couple of test warnings.

Current counts:
Figgy: 56172
Hydration Cache: 56106
Transformation Cache: 56106
Solr Records: 56106

Copy link

github-actions bot commented Nov 22, 2024

Container Scanning Status: ✅ Success


ghcr.io/pulibrary/dpul-collections:pr-269 (debian 12.6)
=======================================================
Total: 0 (HIGH: 0, CRITICAL: 0)

@eliotjordan eliotjordan changed the title Index documents one at a time after batch Solr update returns an error Better handle transformation and solr indexing errors Nov 25, 2024
@eliotjordan eliotjordan force-pushed the 268-solr-no-title branch 2 times, most recently from 908e509 to 03b3b36 Compare November 26, 2024 18:19
@eliotjordan eliotjordan changed the title Better handle transformation and solr indexing errors Handle transformation and solr indexing errors Nov 26, 2024
@eliotjordan eliotjordan marked this pull request as ready for review November 26, 2024 18:53
tpendragon
tpendragon previously approved these changes Nov 26, 2024
Copy link
Contributor

@tpendragon tpendragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small style suggestion, but no blockers.

Looks great!

)

if response.status != 200 do
Enum.each(docs, fn doc -> add([doc]) end)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: docs |> Enum.each(&add/1) or Enum.each(docs, &add/1)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to change the guard clauses a bit, but overall, I think it's better now.

@@ -27,7 +27,7 @@ defmodule DpulCollections.IndexingPipeline.Figgy.HydrationCacheEntry do

%{
id: id,
title_txtm: get_in(metadata, ["title"]),
title_txtm: extract_title(metadata),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that we're starting to get to a pattern here.

@tpendragon tpendragon merged commit 3bfacc1 into main Nov 26, 2024
4 checks passed
@tpendragon tpendragon deleted the 268-solr-no-title branch November 26, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants