- npm >= 6
- node >= 10
-
git clone https://github.com/SciCatProject/panosc-search-api.git
-
cd panosc-search-api
-
npm install
-
Set the ENV variables
export BASE_URL=<CATAMEL_API_BASE_URL> # e.g. https://scicat.ess.eu/api/v3 export FACILITY=<YOUR_FACILITY> # e.g. ESS export PSS_BASE_URL=<PANOSC_SEARCH_SCORING_API_URL> # e.g. http://scicat08.esss.lu.se:32222 export PSS_ENABLE=<1 or 0> # e.g. 1 if you have a PSS running in your facility or 0 if you do not export RETURN_ZERO_CODE=<1 or 0> # e.g. 1 if you would like to retrieve items that have a score of zero when scoring is enabled
-
npm start
Please refer to the reference implementation of the PaNOSC Search API for all the official documentation. It can be found here
Additional information regarding queries, can be found in the documentation of the PaNOSC Federated Search. IT can be found here
If you are interested in testing the scoring capabilities and document relevancy, here is a quick how-to
-
make sure that the PSS scoring is enabled. At ESS, the relevant environmental variables are set as following:
export PSS_BASE_URL="http://scicat08.esss.lu.se:32222" export PSS_ENABLE=1
Make sure to point to your own PaNOSC Scoring Service instance. The ESS one is not publicly accessible
-
access the explorer interface at http://localhost:3000/explorer
-
search for 10 top most relevant datasets/documents that are relevant to the key words temperature and kafka. Copy and paste the following filter and query in the matching fields of the enpoints Datasets or Documents:
- filter = {"limit":10}
- query = "temperature kafka"
or you can combine them in just the following filter expression:
- filter - {"limit:10,"query":"temperature kafka"}
They are equivalent.
In order to generate a new release, please follow the new few steps
- Make sure that the code is properly tagged with the correct version
- Make sure that your account on GitHub has upload permissions for packages
- Login on GitHub container registry:
docker login ghcr.io --username <your-github--username>
- Run the release script:
docker-image-release.sh <release-tag>
If you would like to deploy the docker image containing the PaNOSC Search API SciCat implementation, please refer to the related container repository accessible on github at the following URL:
To install the latest stable releas of the PaNOSC Search API (SciCat implementation), you may run the following command in a terminal:
docker pull ghcr.io/scicatproject/panosc-search-api:stable
If you want to deploy a specific version, replace stable with the version tag. If you weant to install verion 1.1.2, the command should be:
docker pull ghcr.io/scicatproject/panosc-search-api:v1.1.2
You can also use the full image name in a docker compose file.