We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It could be interesting to be able to sort buckets (alphabetically at least) or by any other possible criteria.
We wish see such as feature soon in your module.
Best Regards!
The text was updated successfully, but these errors were encountered:
Hi @Bartaf83,
I think this is already possible with Itemsjs version 2.1.15. You can check #109 tests/facetSortingSpec.js where the feature is added.
For example alphabetically facet sorting:
describe('facet sorting', function() { it('sort by key', function test(done) { const result = require('./../index')(items, { aggregations: { genres: { sort: ['key'], } } }).aggregation({ name: 'genres', }); assert.deepEqual(result.data.buckets.map(v => v.key), ['Comedy', 'Drama', 'Horror', 'Romance', 'Western']); done(); });
Sorry, something went wrong.
It will require better documentation / guide so any help is needed here but I am closing now because this feature is available
No branches or pull requests
It could be interesting to be able to sort buckets (alphabetically at least) or by any other possible criteria.
We wish see such as feature soon in your module.
Best Regards!
The text was updated successfully, but these errors were encountered: