pelias-suggester-pipeline

2.0.4 • Public • Published

suggester-pipeline

Build Status

NPM

Exports a Transform stream that builds the suggester payload (data used in /suggest queries by the Pelias API) in received objects. Data being sent to the Pelias elasticsearch index must be pipe'd through the this stream or it won't turn up in suggest results. All inbound records must contain the following properties:

{
    name: {
        default: ...
    },
    _meta: {
        type: ...,
        id: ...
    }
}

And will receive a suggest property mapped to an object. If you're using pelias-model, everything will work right out of the box.

example usage

var peliasSuggesterPipeline = require( 'pelias-suggester-pipeline' );
 
someDocumentStream
    .pipe( peliasSuggesterPipeline.pipeline )
    .pipe( /* rest of pelias pipeline */ );

Readme

Keywords

Package Sidebar

Install

npm i pelias-suggester-pipeline

Weekly Downloads

4

Version

2.0.4

License

MIT

Last publish

Collaborators

  • sevko
  • missinglink
  • dianashk
  • julian_mapzen
  • pelias
  • trescube