- What is it?
- Optimistic concurrency / Document centric versioning constraints
- Solr rejects older documents with a 409 error.
- Why?
- If you are ingesting multiple versions of a document but you don't have a guarantee of the order in which they will be ingested.
- How?
- Simply add some configuration to your solrconfig.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require 'httparty' | |
solr_url = "https://#{ENV["SOLRCLOUD_HOST"]}/solr/admin/collections" | |
auth = { username: ENV["SOLR_AUTH_USER"], password: ENV["SOLR_AUTH_PASSWORD"] } | |
resp = HTTParty.get(solr_url, basic_auth: auth, query: { action: "LIST" }) | |
matcher = ARGV.join || "thisisnotarealcollectionname" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 755639b062052ed6b752ab08e220c9ed9857d69a Mon Sep 17 00:00:00 2001 | |
From: David Kinzer <dtkinzer@gmail.com> | |
Date: Tue, 9 Nov 2021 14:54:55 -0500 | |
Subject: [PATCH] Update references to 'master' branch. | |
--- | |
Adding-new-document-actions.md | 4 ++-- | |
Atom-Responses.md | 2 +- | |
Blacklight-configuration.md | 14 +++++++------- | |
Blacklight-on-Heroku.md | 4 ++-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hello world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM harbor.k8s.temple.edu/library/alpine:3.13 | |
CMD [ "echo", "hello world" ] | |
# build this with: | |
# docker build --tag=harbor.k8s.temple.edu/tulibraries/hello_world_dkinzer:latest . | |
# push this with: | |
# docker push harbor.k8s.temple.edu/tulibraries/hello_world_dkinzer:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def compose(*args) | |
identity = ->(x) { x } | |
args.reduce(identity) do |a, b| | |
if b.is_a? Proc | |
a >> b | |
else | |
a >> method(b) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime, timedelta | |
import os | |
from airflow.operators.bash_operator import BashOperator | |
DEFAULT_ARGS = { "retries": 0, catchup: False, max_active_runs: 1, schedule_interval: None } | |
def create_dag(env, version): | |
dag_id = "hello_" + env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
RSpec.describe Traject::Indexer::NokogiriIndexer do | |
let(:settings) { { | |
"nokogiri.each_record_xpath" => "/oai:OAI-PMH/oai:ListRecords/oai:record", | |
"nokogiri.namespaces" => { "oai" => "http://www.openarchives.org/OAI/2.0/" }, | |
"solr_writer.commit_on_close" => "false", | |
} } | |
let(:records) { Traject::NokogiriReader.new(StringIO.new( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
# | |
# A script for retrieving a local repository of public and authentication notes | |
# for electronic collections and services. | |
# | |
items_ids = File.readlines("#{ENV["HOME"]}/Downloads/asrs_items.csv") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "thread" | |
class Delay | |
def initialize(&thunk) | |
@semaphore = Mutex.new | |
@thunk = thunk | |
@evaluated = false | |
end | |
def value |
NewerOlder