You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varitemsjs=require('itemsjs')(data,{sortings: {year_asc: {// field name in datafield: 'year',// possible values asc or descorder: 'asc'},year_name_asc: {// Multiple criteria possiblefield: ['date','name'],order: ['asc','asc']}},aggregations: {tags: {title: 'Tags',// conjunctive facet (AND)conjunction: true,// sort can ben an arraysort: ['selected','count','key']order: ['desc','desc','asc']// the default is 10size: 20},rating: {title: 'Actors',// non conjunctive facet (OR)conjunction: false,// it is sorting by value (not by count). 'count' is the defaultsort: 'key',order: 'asc',size: 5,// If you want to retrieve the min, max, avg, sum rating values from the whole filtered datasetshow_facet_stats: true,// If you don't want selected filters to be positioned at the top of the filter listchosen_filters_on_top: false,// If you don't want to show filters with no results returnedhide_zero_doc_count: true}},searchableFields: ['name','tags'],});
// full text searchvarmovies=itemsjs.search({per_page: 1,sort: {// Custom sort not defined in configurationfield: 'year',order: 'asc'},filters: {tags: ['1980s']}})