Add a replica property

Share:

Description

Assign an arbitrary property to a particular replica and give it the value specified. If the property already exists, it will be overwritten with the new value.

Usage

1
2
collection_addreplicaprop(name, shard, replica, property, property.value,
  shardUnique = FALSE, raw = FALSE, callopts = list())

Arguments

name

(character) Required. The name of the collection this replica belongs to.

shard

(character) Required. The name of the shard the replica belongs to.

replica

(character) Required. The replica, e.g. core_node1.

property

(character) Required. The property to add. Note: this will have the literal 'property.' prepended to distinguish it from system-maintained properties. So these two forms are equivalent: property=special and property=property.special

property.value

(character) Required. The value to assign to the property.

shardUnique

(logical) If TRUE, then setting this property in one replica will (1) remove the property from all other replicas in that shard. Default: FALSE

raw

(logical) If TRUE, returns raw data

callopts

curl options passed on to GET

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
solr_connect()

# create collection
collection_create(name = "addrep", numShards = 2) # bin/solr create -c addrep

# status
collection_clusterstatus()$cluster$collections$addrep$shards

# add the value world to the property hello
collection_addreplicaprop(name = "addrep", shard = "shard1", replica = "core_node1",
   property = "hello", property.value = "world")

# check status
collection_clusterstatus()$cluster$collections$addrep$shards
collection_clusterstatus()$cluster$collections$addrep$shards$shard1$replicas$core_node1

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.