create_index: Create an index

View source: R/index.R

create_indexR Documentation

Create an index

Description

Create or modify an index.

Usage

create_index(
  index,
  name = index,
  description = NULL,
  create_fields = NULL,
  guest_role = NULL,
  credentials = NULL
)

modify_index(
  index,
  name = index,
  description = NULL,
  guest_role = NULL,
  credentials = NULL
)

Arguments

index

short name of the index to create (follows naming conventions of Elasticsearch, see details).

name

optional more descriptive name of the index to create (all characters are allowed here)

description

optional description of the index to create

create_fields

create fields in the new index.

guest_role

Role for unauthorized users. Options are "admin", "writer", "reader" and "metareader".

credentials

The credentials to use. If not given, uses last login information.

Details

The short name for the new index (index argument) must meet these criteria:

  • Lowercase only

  • Cannot include ⁠\⁠, /, *, ⁠?⁠, ⁠"⁠, <, >, |, :, ⁠ ⁠(space), ⁠,⁠ (comma), ⁠#⁠

  • Cannot start with -, _, +

  • Cannot be . or ..

  • Cannot be longer than 255 character (note that some symbols like emojis take up tw characters)

  • If names start with ., the index will be hidden and non accesible

Functions

  • modify_index(): Modify an index

Examples

## Not run: 
create_index("test_index")

## End(Not run)


ccs-amsterdam/amcat4r documentation built on April 17, 2025, 3:22 a.m.