RDF to Solr document converter microservice
Requires Python 3.12
git clone [email protected]:umd-lib/solrizer.git
cd solrizer
python -m venv --prompt "solrizer-py$(cat .python-version)" .venv
source .venv/bin/activate
pip install -e '.[dev,test]'
Create a .env
file with the following contents:
FLASK_DEBUG=1
SOLRIZER_FCREPO_ENDPOINT={URL of fcrepo instance}
SOLRIZER_FCREPO_JWT_TOKEN={authentication token}
SOLRIZER_IIIF_IDENTIFIER_PREFIX=fcrepo:
SOLRIZER_IIIF_MANIFESTS_URL_PATTERN={URI template for IIIF manifests}
SOLRIZER_IIIF_THUMBNAIL_URL_PATTERN={URI template for IIIF thumbnail images}
SOLRIZER_INDEXERS={"__default__":["content_model","discoverability","page_sequence","iiif_links","dates","facets","extracted_text"],"Page":["content_model","root"],"File":["content_model","root"]}
In the IIIF URI templates, use {+id}
as the placeholder for the IIIF
identifier of the resource being indexed.
flask --app solrizer.web run
The application will be available at http://localhost:5000
pytest
With coverage information:
pytest --cov src --cov-report term-missing tests
pdoc solrizer
API documentation generated by pdoc will be available at http://localhost:8080/.
To serve the documentation on an alternate port:
pdoc -p 8888 solrizer
Now the documentation will be at http://localhost:8888/.
Build the image:
docker build -t docker.lib.umd.edu/solrizer .
Run, using the .env
file set up earlier:
docker run --rm -it -p 5000:5000 --env-file .env docker.lib.umd.edu/solrizer
See the LICENSE file for license rights and limitations (Apache 2.0).