Skip to main content

Get Text Search Vectors

Controlled node

Overview

The Get Text Search Vectors node converts text input into PostgreSQL text search vectors (tsvectors) for full-text search indexing. This node is essential for preparing text data for efficient searching within Intellectible's database system. It supports multiple languages for proper tokenization and stemming, and allows weighting of text segments to influence search ranking.

This node is typically used in conjunction with the Text Search Database node to perform full-text searches against indexed content.

Language Support

The node supports the following languages for text processing:

  • Simple - Generic tokenization without language-specific stemming
  • English, Arabic, Armenian, Basque, Catalan, Danish, Dutch, Finnish, French, German, Greek, Hindi, Hungarian, Indonesian, Irish, Italian, Lithuanian, Nepali, Norwegian, Portuguese, Romanian, Russian, Serbian, Spanish, Swedish, Tamil, Turkish, Yiddish

Weight Categories

Text can be assigned weights to influence search result ranking:

  • A - Very Important (highest relevance)
  • B - Important (default)
  • C - Neutral
  • D - Less Important (lowest relevance)

Inputs

InputTypeDescriptionDefault
RunEventTriggers the node to generate text search vectors.-
Database IDDataThe ID of the database where the text search vectors will be used.-
TextDataThe text content to convert into search vectors.-
LanguageEnumThe language to use for text processing and stemming.english
WeightEnumThe weight category assigned to the generated vectors (A-D).B

Outputs

OutputTypeDescription
DoneEventFires when the node has finished processing the text.
VectorsDataThe generated text search vectors in PostgreSQL tsvector format.

Runtime Behavior and Defaults

When triggered, the node processes the input text using the specified language's dictionary to generate normalized search vectors. The weight parameter assigns a priority level to the text, which affects ranking when used in conjunction with weighted search queries.

Default Values:

  • Language: english - Uses English stemming and stop word rules
  • Weight: B - Assigns "Important" weight to the text

The node validates that both databaseId and text inputs are provided and that the project context is available. If validation fails or the database system encounters an error, the node will return an error object in the output.

Example Usage

Basic Text Vector Generation:

  1. Connect a Start node or trigger event to the Run input
  2. Provide a database ID (from your project database) to the Database ID input
  3. Connect text content (from a Plain Text node or variable) to the Text input
  4. Optionally specify a different language (e.g., french, german) via the Language input
  5. Optionally change the Weight to A for critical content or D for less relevant content
  6. Connect the Vectors output to a Text Search Database node's query input, or store the vectors in a database column for later searching

Workflow Example:

Start → [Run] Get Text Search Vectors [Vectors] → InsertIntoDatabase

Database ID: "my-project-db"
Text: "This is important document content about artificial intelligence"
Language: "english"
Weight: "A"

In this example, the node generates weighted search vectors for the provided text, which can then be stored in a database table with a tsvector column to enable fast full-text searching later.