Closed lennym closed 8 years ago
Example script I used to test locally:
require('env2')('.env');
const suggest = require('./lib/suggest');
suggest({
text: 'london',
exclude: ['hotel']
}, (err, result) => {
if (err) throw err;
console.log(result.data.hits.hit.map(hit => hit.fields.tagid));
});
suggest({
text: 'london',
include: ['geo', 'tile']
}, (err, result) => {
if (err) throw err;
console.log(result.data.hits.hit.map(hit => hit.fields.tagid));
});
This means that any pagination parameters will be respected irrespective of filters that were subsequently applied. By not having to iterate over the full result set in memory we might see an additional performance improvement also.
Fixes numo-labs/isearch-ui#389