Typesense icon

Typesense

Interact with the Typesense search platform

Collection → Create

AI-generated

Overview

This node operation creates a new collection schema in the Typesense search platform. It allows users to define the structure of the collection either by providing raw JSON schema or by specifying schema parameters through a user-friendly interface. This is useful for setting up searchable collections with customized fields, types, and indexing options in Typesense, enabling efficient and tailored search experiences.

Use Case Examples

  1. Creating a new collection schema with fields like name, type, and indexing options to organize searchable data.
  2. Defining a collection schema using raw JSON to quickly set up complex nested fields and metadata for advanced search capabilities.

Properties

Name Meaning
JSON Parameters Whether to provide the collection schema as raw JSON instead of using the UI fields.
Collection Schema (JSON) The JSON representation of the collection schema, used when JSON Parameters is true.
Collection Schema The collection schema defined through UI parameters including name, nested fields option, and detailed field definitions.
Additional Options Extra optional settings for the collection such as default sorting field, token separators, symbols to index, and metadata in JSON format.

Output

JSON

  • name - Name of the created collection.
  • fields - Array of field definitions in the created collection schema.
  • default_sorting_field - Field used for default sorting in the collection.
  • token_separators - Characters used as token separators in the collection.
  • symbols_to_index - Symbols included in the index for the collection.
  • metadata - Optional metadata stored with the collection schema.

Dependencies

  • Typesense API key credential for authentication with the Typesense platform.

Troubleshooting

  • Error loading collections or fields usually indicates connectivity or authentication issues with the Typesense server. Verify API credentials and network access.
  • Invalid JSON schema input will cause errors when JSON Parameters is true. Ensure the JSON is well-formed and matches Typesense schema requirements.
  • Missing required fields in the schema parameters can cause creation to fail. Ensure all mandatory fields like collection name and field names are provided.

Links

Discussion