Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

collection_addrole

Add a role to a node


Description

Assign a role to a given node in the cluster. The only supported role as of 4.7 is 'overseer' . Use this API to dedicate a particular node as Overseer. Invoke it multiple times to add more nodes. This is useful in large clusters where an Overseer is likely to get overloaded . If available, one among the list of nodes which are assigned the 'overseer' role would become the overseer. The system would assign the role to any other node if none of the designated nodes are up and running

Usage

collection_addrole(conn, role = "overseer", node, raw = FALSE, ...)

Arguments

conn

A solrium connection object, see SolrClient

role

(character) Required. The name of the role. The only supported role as of now is overseer (set as default).

node

(character) Required. The name of the node. It is possible to assign a role even before that node is started.

raw

(logical) If TRUE, returns raw data

...

curl options passed on to crul::HttpClient

Examples

## Not run: 
(conn <- SolrClient$new())

# get list of nodes
nodes <- conn$collection_clusterstatus()$cluster$live_nodes
collection_addrole(conn, node = nodes[1])

## End(Not run)

solrium

General Purpose R Interface to 'Solr'

v1.1.4
MIT + file LICENSE
Authors
Scott Chamberlain [aut, cre] (<https://orcid.org/0000-0003-1444-9135>), rOpenSci [fnd] (https://ropensci.org/)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.