AI Assistant: Query Your Data, Update Content + More
bundle

Okam Typesense

Typesense admin interface and basic operations

Okam Typesense Library

Minimum Requirements

  • Directus 11.8.0

Environment

# use for upsert and delete operations
TYPESENSE_HOST=https://server:port
# use for upsert and delete operations
TYPESENSE_APIKEY_WRITE=xyz
# use for upsert, delete and content-fetch operations
# default is 5 (seconds) if not specified or value not in range [1...3600]
TYPESENSE_FETCH_TIMEOUT=5

Operation okam-typesense-upsert

Insert or update an item or a list of item using id as primary key.

The schema must exists before calling this operation.

Use environment variables TYPESENSE_HOST and TYPESENSE_APIKEY_WRITE if override are not provided.

Options

  • collection : the name of the typesense collection
  • item : an object or an array of object, with id field
  • host_override : allow the operation to override the default TYPESENSE_HOST
  • apikey_override : allow the operation to override the default TYPESENSE_APIKEY_WRITE

Operation okam-typesense-delete

Delete an item or a list of item using id as primary key

The schema must exists before calling this operation.

Use environment variables TYPESENSE_HOST and TYPESENSE_APIKEY_WRITE if override are not provided.

Options

  • collection : the name of the typesense collection
  • key : the typesense item string key, if provided, item won't be used
  • item : an object or an array of object, with id field
  • host_override : allow the operation to override the default TYPESENSE_HOST
  • apikey_override : allow the operation to override the default TYPESENSE_APIKEY_WRITE

Operation okam-typesense-content-fetch

(since 1.1.0)

Fetch JSON content with GET and return the value of {data: } field in the response. Use the fetch timeout.

  • method GET
  • url
  • body (should be empty for GET)

Module okam-typesense-admin

See README