Skip to content

umd-lib/umd-fcrepo-solr

Repository files navigation

umd-fcrepo-solr

UMD Libraries Solr Index for Fedora (fedora4 core)

Key Components

Docker Image

Uses the Solr Docker base image, Solr version 7.7.3.

Dockerfile

Volumes

Mount point Purpose
/var/opt/solr Persistent core data

Ports

Port number Purpose
8983 Solr web admin interface

Build

Build the image:

docker build -t docker.lib.umd.edu/fcrepo-solr-fedora4 .

Run

docker run -it --rm --name fcrepo-solr-fedora4 \
    -p 8983:8983 \
    docker.lib.umd.edu/fcrepo-solr-fedora4

The Solr web admin console will be at http://localhost:8983/solr/#/

The Java heap size can be controlled by setting the environment variable SOLR_FEDORA4_HEAP_SIZE. The default if it is not set is 1024m.

Testing

This repository has a Python pytest test suite for testing.

Installing

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Running

The tests require a running instance of this Solr image. By default, it assumes that the endpoint URL is http://localhost:8983/solr/fedora4. This can be changed by setting the environment variable SOLR_ENDPOINT.

# run tests with the default endpoint
pytest

# run with a custom endpoint (e.g., a different port)
export SOLR_ENDPOINT=http://localhost:18983/solr/fedora4
pytest

History

This code comes from the solr-fedora4 subdirectory of the umd-fcrepo-docker project at the 1.0.1 release.

License

See the LICENSE file for license rights and limitations (Apache 2.0).