core_unload: Unload (delete) a core

View source: R/core_unload.R

core_unloadR Documentation

Unload (delete) a core

Description

Unload (delete) a core

Usage

core_unload(
  conn,
  name,
  deleteIndex = FALSE,
  deleteDataDir = FALSE,
  deleteInstanceDir = FALSE,
  async = NULL,
  raw = FALSE,
  callopts = list()
)

Arguments

conn

A solrium connection object, see SolrClient

name

(character) The name of the core to be created. Required

deleteIndex

(logical) If TRUE, will remove the index when unloading the core. Default: FALSE

deleteDataDir

(logical) If TRUE, removes the data directory and all sub-directories. Default: FALSE

deleteInstanceDir

(logical) If TRUE, removes everything related to the core, including the index directory, configuration files and other related files. Default: FALSE

async

(character) Request ID to track this action which will be processed asynchronously

raw

(logical) If TRUE, returns raw data

callopts

curl options passed on to crul::HttpClient

Examples

## Not run: 
# start Solr with Schemaless mode via the schemaless eg:
#   bin/solr start -e schemaless

# connect
(conn <- SolrClient$new())

# Create a core
conn$core_create(name = "books")

# Unload a core
conn$core_unload(name = "books")
## not found
# conn$core_unload(name = "books")
# > Error: 400 - Cannot unload non-existent core [books]

## End(Not run)

ropensci/solrium documentation built on Sept. 12, 2022, 3:01 p.m.