Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

algolia-query-rules-to-typesense

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

algolia-query-rules-to-typesense

A CLI utility to import Algolia's query rules JSON into Typesense

  • 0.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

algolia-query-rules-to-typesense

This is a simple CLI utility to convert query rules from Algolia to Typesense's Override API JSON.

Usage:

npx algolia-query-rules-to-typesense <path/to/algolia_rules_export.json> <path/to/typesense_overrides_output.json>

To get algolia_rules_export.json, go to the "Rules" section of your Algolia index, and you'll find a download icon to export the rules as JSON.

This is the expected format of algolia_rules_export.json:

[
  {
    "description": "Test Rule",
    "conditions": [
      {
        "anchoring": "is",
        "pattern": "keyword",
        "alternatives": true
      }
    ],
    "consequence": {
      "params": {
        "filters": "..."
      },
      "filterPromotes": true
    },
    "enabled": true,
    "objectID": "qr-1682441011"
  }
]

After running this command, the output JSON will be in this format:

[
  {
    "id": "Test Rule - qr-1682441011",
    "rule": {
      "query": "keyword",
      "match": "exact"
    },
    "filter_curated_hits": true,
    "filter_by": "..."
  }
]

You can then import these JSON rules into Typesense using the Typesense API.

Keywords

FAQs

Package last updated on 26 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc