Query Solr via a browser
Solr is queried via what’s called an HTTP API (Application Program Interface). Practically, what this means it that you can execute a query in your browser by tacking a query onto a base URL.
This is similar to the way Google handles your searches. If I search “soil science” in Google, for example, the URL becomes:
https://www.google.com/search?q=soil+science&oq=soil+science&aqs=chrome.0.69i59.1350j0j1&sourceid=chrome&ie=UTF-8
If I break it down into pieces, I get:
- the base URL -
https://www.google.com/search
?
, after which the query parameters are listed- the query -
q=soil+science
- other parameters, which are separated by
&
-oq=soil+science&aqs=chrome.0.69i59.1350j0j1&sourceid=chrome&ie=UTF-8
Most of the time, you’ll query either the Arctic Data Center member node or the PROD
coordinating node, which have the following base URLs:
- Arctic Data Center member node: https://arcticdata.io/metacat/d1/mn/v2/query/solr
PROD
coordinating node: https://cn.dataone.org/cn/v2/query/solr
You can then append your query parameters to your base URL:
https://arcticdata.io/metacat/d1/mn/v2/query/solr/?q={QUERY}&fl={FIELDS}&rows={ROWS}
Visit the base URL to see a list of fields Solr is storing for the objects it indexes.
There is a large set of queryable fields, though not all types of
objects will have values set for all of the possible fields because some
fields do not make sense for some objects (e.g., title
for
a CSV).