Closed joostmeijles closed 3 years ago
When using filter with paging I do not get any results back.
filter
paging
Test case:
it('paged filtered search', function test(done) { const items = [{ id: 1 }, { id: 2 }, { id: 3 }]; const index = require('./../index')(items); const res = index.search({ query: '', page: 2, per_page: 1, filter: (item) => item.id > 1, }); assert.deepEqual(res.data.items, [{ _id: 3, id: 3 }]); done(); });
Is this a bug or am I using it wrongly?
Fixed #88
When using
filter
withpaging
I do not get any results back.Test case:
Is this a bug or am I using it wrongly?