search-facet-builder
Get a faceted search data structure from some search results.
Installation
npm install --save search-facet-builder
Usage
// FacetStream is a Transform stream classvar FacetStream = // Get a readStream from somewhere, e.g. a mongo cursor readStream = service // Instantiate a facet stream in which to pump your datavar facetStream = city: true category: true // Pipe the search results through the facet streamreadStream // When the data has finished flowing you can access the facet data structurefacetStream
Credits
Built by developers at Clock.
Licence
Licensed under the New BSD License