This is an implementation of an adapter service that allows Quepid to communicate with Solr instances through middleware search API services.
This project allows you to perform human judgments of search results when your backend instance of Solr is accessed through an API that abstracts and controls the search queries and results. The adapter works by emulating the Solr search API in front of the middleware search service. This makes Quepid think it is talking directly to Solr and enables the use of Quepid.
git clone https://github.com/gettyimages/quepid-adapter.git
cd quepid-adapter
mvn clean install
mvn spring-boot:run
After compiling you can also just run the jar file:
java -jar ./quepid-adapter-service/target/quepid-adapter.jar
This will start the adapter on port 8080
(unless the port has been changed in the application.properties
).
You can now add a new case to Quepid by using http://localhost:8080/search
as the Solr endpoint. The following Quepid operations are supported:
- Search
- Snapshot comparison
- Getting individual document details
Because all middleware search services are propietary and different, a custom implementation is required for each one. Look at the quepid-adapter-uspto
project for an example implementation that uses the USPTO search API.
To make this project work with your middleware API service, simply copy the quepid-adapter-uspto
project, modify the API definitions, and modify how the middleware search responses get converted to Solr documents. You will likely need to do this for two functions - one to perform the search and another get a single document by some unique identifier.
Contributions are welcome. Please open a GitHub issue.
MIT License Copyright (c) 2021 Getty Images
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.