Create a core

Description

Create a core

Usage

1
2
3
core_create(name, instanceDir = NULL, config = NULL, schema = NULL,
  dataDir = NULL, configSet = NULL, collection = NULL, shard = NULL,
  async = NULL, raw = FALSE, callopts = list(), ...)

Arguments

name

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

instanceDir

(character) Path to instance directory

config

(character) Path to config file

schema

(character) Path to schema file

dataDir

(character) Name of the data directory relative to instanceDir.

configSet

(character) Name of the configset to use for this core. For more information, see https://cwiki.apache.org/confluence/display/solr/Config+Sets

collection

(character) The name of the collection to which this core belongs. The default is the name of the core. collection.<param>=<val ue> causes a property of <param>=<value> to be set if a new collection is being created. Use collection.configNa me=<configname> to point to the configuration for a new collection.

shard

(character) The shard id this core represents. Normally you want to be auto-assigned a shard id.

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 GET

...

You can pass in parameters like property.name=value to set core property name to value. See the section Defining core.properties for details on supported properties and values. (https://cwiki.apache.org/confluence/display/solr/Defining+core.properties)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
# start Solr with Schemaless mode via the schemaless eg: bin/solr start -e schemaless
# you can create a new core like: bin/solr create -c corename
# where <corename> is the name for your core - or create as below

# connect
solr_connect()

# Create a core
path <- "~/solr-5.4.1/server/solr/newcore/conf"
dir.create(path, recursive = TRUE)
files <- list.files("~/solr-5.4.1/server/solr/configsets/data_driven_schema_configs/conf/",
full.names = TRUE)
file.copy(files, path, recursive = TRUE)
core_create(name = "newcore", instanceDir = "newcore", configSet = "basic_configs")

## End(Not run)

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