2.0.7 • Published 8 years ago

dbc-node-popsuggest v2.0.7

Weekly downloads
4
License
GPL-3.0
Repository
github
Last release
8 years ago

dbc-node-opensuggest

David David

Client for the DBC suggestion service

Implements the suggest method that based on query parameters gives suggestions for continued search.

##How to use:

import * as PopSuggest from 'dbc-node-popsuggest';
       

// Initialize service with required paramters. Returns methods on client
const popSuggest = PopSuggest.init({
  endpoint: 'http://xp-p02.dbc.dk',
  port: 8016
});

// make a query. This returns a promise.
popSuggest.getPopSuggestions({index: 'display.title', query: 'Rowl', fields: ['display.title']})
.then((result) => {
  console.log(result)
});
};

##Methods:

entitySuggest.getPopSuggestions({query, index, fields, start, row, filter})

  • query: The solr query to execute REQUIRED
  • index: The solr index to search
  • fields: The fields to return from search hits. Each wanted field can be specified in separate fields arguments, or as a comma-seperated list
  • start: pagination - pagenumber
  • row: pagination - number of rows per page (Defaults to 100)
  • filter: The solr filters to apply to suggest search. Each wanted field can be specified in separate fields arguments, or as a comma-seperated list. The format is field:value for example filter="phrase.type:bog"
2.0.7

8 years ago

2.0.6

8 years ago

2.0.2

8 years ago

2.0.1

9 years ago

1.0.2

9 years ago