@financial-times/n-concept-bump
[![CircleCI](https://circleci.com/gh/Financial-Times/n-concept-bump/tree/master.svg?style=svg&circle-token=7ade9fcc41f89ade4761c7824cd2c8a5f362de3f)](https://circleci.com/gh/Financial-Times/n-concept-bump/tree/master)
Last updated a year ago by the-ft .
Original npm · Tarball · package.json
$ cnpm install @financial-times/n-concept-bump 
SYNC missed versions from official npm registry.

Next Concept Bump

CircleCI

Interface for updating annotations for FT.com content.

It works by creating a task on the target Elasticsearch cluster which will find and rewrite annotations and concepts used by our content without the need to reingest.

Prerequisites

Compatible with Node 6+

Usage

CLI

You can view the available commands and options by running:

$ bump --help

You will also need to set some enviroment variables for authorisation:

  • THINGS_API_KEY for accessing data from the FT things API

And if you are working with a cluster provided by AWS:

  • ES_AWS_ACCESS_KEY an AWS access key with Elasticsearch administrative permissions
  • ES_AWS_SECRET_ACCESS_KEY an AWS secret access key for the above

The example below assumes the existence of a HOST environment variable specifying the URL of the Elasticsearch cluster:

# The script will find the latest version and all superseded IDs for the given concept
$ bump "${HOST}" 6d289d62-0272-39e0-9254-28ac84fd3279
> ? Replace 6d289d62-0272-39e0-9254-28ac84fd3279 with a16e302d-07c2-4a5c-89c8-d5e53691015e? (Y/n)
> Update successful: Updated 1291 items in 581ms

Node

The module exports a single function:

const bump = require('@financial-times/n-concept-bump');
const host = 'http://localhost:9200';

// The module will find the latest version and all superseded IDs for the given concept
bump(host, '70f4732b-7f7d-30a1-9c29-0cceec23760e');

As with CLI usage, you will need the API_KEY environment variable set and ES_AWS_ACCESS_KEY and ES_AWS_SECRET_ACCESS_KEY enviroment variables if working on an AWS provided cluster.

Limitations

  • This software can replace multiple targets but only with a single concept. This means multiple concept changes must be queued and processed in series.
  • When an Elasticsearch document is modified it is placed into a queue for processing. A document cannot be queued twice so if a document affected by this script is also reingested there will be a version mismatch and one version will be ignored.

Current Tags

  • 1.0.1                                ...           latest (a year ago)

6 Versions

  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           2 years ago
  • 1.0.0-beta.4                                ...           2 years ago
  • 1.0.0-beta.3                                ...           2 years ago
  • 1.0.0-beta.2                                ...           2 years ago
  • 1.0.0-beta.1                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 6
Last Day 0
Last Week 6
Last Month 2
Dependencies (4)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |