Typesense icon

Typesense

Interact with the Typesense search platform

Analytics → Create Analytics Rule

AI-generated

Overview

This node interacts with the Typesense search platform to create analytics rules. Specifically, the 'Create Analytics Rule' operation allows users to define analytics rules in JSON format, which can be used to monitor and analyze search query patterns and events within a Typesense collection. This is useful for scenarios such as tracking popular queries, no-hit queries, counters, or logs to gain insights into search behavior and improve search relevance.

Use Case Examples

  1. Creating an analytics rule to track popular search queries in a specific collection.
  2. Defining a no-hit queries rule to identify search terms that return no results, helping to optimize the search index.

Properties

Name Meaning
Analytics Rule (JSON) The analytics rule defined as a JSON string. It must include required fields such as name, type (e.g., popular_queries, nohits_queries, counter, log), collection, and event_type. The input can be a single JSON object or an array of objects representing multiple rules.

Output

JSON

  • name - Name of the created analytics rule.
  • type - Type of the analytics rule (e.g., popular_queries, nohits_queries, counter, log).
  • collection - The collection to which the analytics rule applies.
  • event_type - The event type that the analytics rule monitors.
  • id - Unique identifier of the created analytics rule.
  • created_at - Timestamp when the analytics rule was created.

Dependencies

  • Requires an API key credential for authenticating with the Typesense platform.

Troubleshooting

  • Ensure the JSON provided in the 'Analytics Rule (JSON)' property is correctly formatted and includes all required fields: name, type, collection, and event_type.
  • If the node throws an error about unsupported resources, verify that the resource parameter is set to 'Analytics' and the operation to 'Create Analytics Rule'.
  • Errors related to API authentication usually indicate missing or invalid API key credentials; verify the credentials configuration in the node settings.

Links

Discussion