Author: Scott Chamberlain
Date: 2020-04-22

# Cores/collections management

#### Scott Chamberlain

#### 2020-04-22

## Installation

Stable version from CRAN

    install.packages("solrium")

Or the development version from GitHub

    remotes::install_github("ropensci/solrium")

Load

    library("solrium")

Initialize connection

    (conn <- SolrClient$new())

    #> <Solr Client>
    #>   host: 127.0.0.1
    #>   path:
    #>   port: 8983
    #>   scheme: http
    #>   errors: simple
    #>   proxy:

## Cores

There are many operations you can do on cores, including:

- `core_create()` - create a core
- `core_exists()` - check if a core exists
- `core_mergeindexes()` - merge indexes
- `core_reload()` - reload a core
- `core_rename()` - rename a core
- `core_requeststatus()` - check request status
- `core_split()` - split a core
- `core_status()` - check core status
- `core_swap()` - core swap
- `core_unload()` - delete a core

### Create a core

    conn$core_create()

### Delete a core

    conn$core_unload()

## Collections

There are many operations you can do on collections, including:

- `collection_addreplica()`
- `collection_addreplicaprop()`
- `collection_addrole()`
- `collection_balanceshardunique()`
- `collection_clusterprop()`
- `collection_clusterstatus()`
- `collection_create()`
- `collection_createalias()`
- `collection_createshard()`
- `collection_delete()`
- `collection_deletealias()`
- `collection_deletereplica()`
- `collection_deletereplicaprop()`
- `collection_deleteshard()`
- `collection_list()`
- `collection_migrate()`
- `collection_overseerstatus()`
- `collection_rebalanceleaders()`
- `collection_reload()`
- `collection_removerole()`
- `collection_requeststatus()`
- `collection_splitshard()`

### Create a collection

    conn$collection_create()

### Delete a collection

    conn$collection_delete()