Description Usage Arguments Details Value Examples
Ping a Solr instance
1 |
conn |
A solrium connection object, see SolrClient |
name |
(character) Name of a collection or core. Required. |
wt |
(character) One of json (default) or xml. If json, uses
[xml2::read_xml)]: R:xml2::read_xml) |
raw |
(logical) If |
... |
curl options passed on to crul::HttpClient |
You likely may not be able to run this function against many public Solr services as they hopefully don't expose their admin interface to the public, but works locally.
if wt="xml"
an object of class xml_document
, if
wt="json"
an object of class list
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
# start Solr, in your CLI, run: `bin/solr start -e cloud -noprompt`
# after that, if you haven't run `bin/post -c gettingstarted docs/` yet,
# do so
# connect: by default we connect to localhost, port 8983
(cli <- SolrClient$new())
# ping the gettingstarted index
cli$ping("gettingstarted")
ping(cli, "gettingstarted")
ping(cli, "gettingstarted", wt = "xml")
ping(cli, "gettingstarted", verbose = FALSE)
ping(cli, "gettingstarted", raw = TRUE)
ping(cli, "gettingstarted", wt="xml", verbose = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.