The UCLA Dataverse is part of the library. The library would like to pull Dataverse objects into an Elasticsearch index for public discovery. Which would involve querying solr. This is what they use for other apps:
curl -I -L "https://dataverse.ucla.edu:8983/solr/collection1/select?q=*:*"
I tried this from localhost:
curl -I -L "https://localhost:8983/solr/collection1/select?q=*:*"
curl: (35) SSL received a record that exceeded the maximum permissible length.
If I try not from a local host I just get a timeout. Is there a way to get this solr information from outside the dataverse server?
Hmm, let's try to get it working from localhost first.
I dev I do something like this:
curl -s 'http://localhost:8983/solr/collection1/select?rows=1000000&wt=json&indent=true&q=*%3A*'
That's not working for you?
This if from https://github.com/IQSS/dataverse/blob/v6.3/scripts/search/query by the way.
That works perfectly from localhost. But, it needs to be run from the outside. I probably need to research that part.
Thank you!
Philip Durbin said:
Hmm, let's try to get it working from localhost first.
I dev I do something like this:
curl -s 'http://localhost:8983/solr/collection1/select?rows=1000000&wt=json&indent=true&q=*%3A*'That's not working for you?
This if from https://github.com/IQSS/dataverse/blob/v6.3/scripts/search/query by the way.
We have a section on Solr security, one sec.
https://guides.dataverse.org/en/6.3/installation/prerequisites.html#securing-solr
It looks like there's a SOLR_IP_ALLOWLIST in bin/solr.in.sh (that file is mentioned above).
I've never used it.
The main thing is the make sure you keep blocking the rest of the Internet :grinning:
:+1:
It would be even better to protect your Solr with a username/password, but that would also require some code changes in Dataverse to inject these deets into the client. Also: it's probably a good idea to make use of HTTPS in Solr (which is no problemo for Dataverse already, as you can set the protocol bit).
Related: Adding Solr Basic Authentication #9337
I'm not sure if you can try to inject the basic auth stuff as part of the host definition
host = "user:pass@host"
MIght be worth a shot...
Or readin' some docs
Last updated: Nov 01 2025 at 14:11 UTC