GithubHelp home page GithubHelp logo

query-rule-csv-upload's Introduction

Query Rule CSV Upload

Manage your Algolia query rules with a CSV file

Requirements

Installation

To run locally/in development environment:

  • Download or clone this repository
  • Navigate to the project root directory
  • Install the required components using npm install
  • Run npm start to start the Electron app

To build:

  • Download or clone this repository
  • Navigate to the project root directory
  • Install the required components using npm install
  • Run the electron-builder command appropriate for your platform
    • For example, to build for Mac, you would run electron-builder -m
    • Multiple environments can be built in parallel

Copies of the application built for Mac and Windows are located in the dist folder.

Usage

To use the tool, 4 pieces of information are required:

  1. A CSV file describing the query rules - a template is included in this repository
  2. Your Algolia application ID
  3. Your Algolia API key
  4. The name of the index on which these rules are being updated

The spreadsheet contains the following columns:

  • Date Updated - a label describing when the rule was updated. This is set manually in the spreadsheet and used for tracking purposes.
  • Updated By - a label describing who last updated the rule. This is set manually in the spreadsheet and used for tracking purposes.
  • Query Rule ID - used as an identifier of the rule. This must be unique per context.
  • Enabled - this can be set to false (not case sensitive) to disable a rule. Any other value will enable the rule.
  • Context - the context for the rule
  • Anchoring - either is, startsWith, endsWith or contains
  • Search Term - the term being matched
  • Replace Query - if you want to add a consequence that replaces the query, you can set the replacement query here.
  • Remove Words - this is used to remove specific words from the query. Note: this will not have any effect if "Replace Query" is set.
  • Filters - if you want to add filters as a query parameter, you can do so here.
  • Optional Filters - if you want to add optional filters as a query parameter, you can do so here. This should be formatted as a comma-separated list of filters.
  • Promoted Items - a comma-separated list of the objectIDs you want to promote to the beginning of the result set. Note: if you use the more granular method of promoting items mentioned below, this parameter is ignored.
  • Promoted Item - if you want to promote a specific objectID, you can create a column specifying where you want to promote it. For example, to promote an item to the 3rd position, you can add a column named Promoted Item 3. Note: This parameter overrides the "Promoted Items" parameter mentioned previously.
  • Promoted Items Follow Filters - determines whether the promoted items follow filters. Defaults to false - set to true to enable this functionality. Note: this column will be ignored if no items are promoted.
  • Start Date - the start date of the query rule, in MM/DD/YYYY format. Note: This value will be ignored if no end date is entered, or if the start date is after the end date.
  • End Date - the end date of the query rule, in MM/DD/YYYY format. Note: This value will be ignored if no start date is entered, or if the end date is before the start date.
  • Alternatives - this can be set to true to enable alternatives to be considered for this rule. Note: this feature is in beta and only available for certain Enterprise customers.
  • Analytics - setting this to false will add a custom query parameter consequence setting the analytics query parameter to false.
  • Facet Position - if you want to set a facet to a specific position, you can create a column specifying where you want to position it. For example, to set a facet in the 3rd position, you can add a column named Facet Position 3. Note: In order for the facet positions to take effect, there is custom frontend development required - see this guide for more information.
  • All other fields will be added as custom data. For example, the template has columns named CustomDataField1 and CustomDataField2, which will add custom data in the following format:
    {
        "CustomDataField1": "this is the data",
        "CustomDataField2": "this is the data again"
    }
    

Contribute

To contribute to the project:

  1. Clone this repository
  2. Commit your changes - make sure your local repository is up to date
  3. Send a pull request to the develop branch

query-rule-csv-upload's People

Contributors

chrislebowitz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.