Indexer

Class representing an S3 Indexer.

Constructor

new Indexer(params)

Handle content indices in an S3 bucket

Parameters:
NameTypeDescription
paramsObject
Properties
NameTypeDescription
credentialsCredentials

the AWS credentials to use for the connection

Classes

Indexer

Methods

(async) createIndices(params)

Create index files

Parameters:
NameTypeDescription
paramsObject
Properties
NameTypeAttributesDescription
prefixstring<optional>

Create indices for this prefix only

(async) getIndex(params)

Get an index file

Parameters:
NameTypeDescription
paramsObject
Properties
NameTypeDescription
prefixstring

provide the domain of the index file

typestring

the class name of the item being operated on

filestring

the index file name

Since
  • 1.17.0

(async) listIndices(params)

List indices in a given domain

Parameters:
NameTypeDescription
paramsObject
Properties
NameTypeDescription
prefixstring

provide the domain of the index file

typestring

the class name of the item being operated on

(async) patchIndex(params)

Patch an index file - add new item to it or remove an existing item. This method works by uploading a patch file and then running a process to patch all the relevant index files. If it detects a lockfile (a patching process is running) it will sleep for a short time and then try again. Given this, you probably don't want to 'await' this in your code as it could take a while to run; depending on how many parallel patch operations are run.

Parameters:
NameTypeDescription
paramsObject
Properties
NameTypeDefaultDescription
action'PUT' | 'DELETE'

the action to perform

classNamestring

the class name of the item being operated on

idstring

the id of the item being operated on

domainstring

provide this to prefix the paths by domain

splaynumber1

the number of characters (from the start of the identifer) when converting the id to a path