Typesense icon

Typesense

Interact with the Typesense search platform

Search → Semantic Search

AI-generated

Overview

This node performs a semantic search on a specified collection within a Typesense instance. It allows users to input a natural language query and vector embeddings to find semantically similar documents in the collection. This is useful for applications like searching large text corpora, recommendation systems, or any scenario where understanding the meaning behind queries is important.

Use Case Examples

  1. A user inputs a natural language query to find relevant documents in a product catalog stored in Typesense.
  2. A developer uses vector embeddings to perform similarity search on a collection of articles to recommend related content.

Properties

Name Meaning
Collection Name Selects the collection in the Typesense instance to search within.
Vector Query Vector embeddings used for similarity search, provided as comma-separated numbers.
Vector Field Specifies the vector field in the collection to perform the search on.
Semantic Query Natural language query string for performing semantic search.
Return All Boolean flag to return all results or limit the number of results.
Limit Maximum number of results to retrieve when Return All is false.
Page Page number for paginated results.
Include Fields Fields to include in the search results; if empty, all fields are included.
Exclude Fields Fields to exclude from the search results.
Typo Tolerance Options Settings to control typo tolerance behavior during search, such as enabling typo tolerance, number of typos allowed, and token handling.
Ranking & Relevance Options to customize ranking and relevance of search results, including query weights, text match type, prioritization, pinned/hidden hits, and synonym handling.
Highlighting Options to enable and customize highlighting of matched terms in the search results.
Faceting Options Settings to control faceting behavior, such as facet strategy, max facet values, and facet query parameters.
Grouping Options Options to control grouping of search results, including handling of missing values.
Filter Options Settings to enable lazy filtering and control max filter candidates.
Caching Options to enable caching of search results and set cache TTL (time to live) in seconds.
Advanced Options Additional advanced search options like presets, stopwords, validation, conversation context, and search cutoff time.

Output

JSON

  • results - Array of search result objects returned from the semantic search query.

Dependencies

  • Typesense API key credential for authentication

Troubleshooting

  • Ensure the selected collection exists in the Typesense instance; otherwise, the node will return an error about missing collections.
  • Vector Query must be a valid comma-separated string of numbers representing embeddings; invalid format will cause errors.
  • If the semantic query is empty or invalid, the search will fail or return no results.
  • Check that the vector field specified exists in the collection schema to avoid errors.
  • When using pagination, ensure the page number and limit are within valid ranges to avoid empty results.

Links

  • Typesense Documentation - Official documentation for Typesense search platform, useful for understanding search parameters and capabilities.

Discussion