itemsapi / itemsjs

Extremely fast faceted search engine in JavaScript - lightweight, flexible, and simple to use
Apache License 2.0
350 stars 41 forks source link

All filtered results #96

Closed Ruitjes closed 2 years ago

Ruitjes commented 2 years ago

added allFilteredItems in the search response #95

cigolpl commented 2 years ago

@Ruitjes that looks great. Could you also make this feature optional ?

It could be enabled i.e. by adding is_all_filtered_items: true (or something like that):

var movies = itemsjs.search({
  per_page: 1,
  is_all_filtered_items: true,
  filters: {
    tags: ['1980s']
  }
})
Ruitjes commented 2 years ago

@Ruitjes that looks great. Could you also make this feature optional ?

It could be enabled i.e. by adding is_all_filtered_items: true (or something like that):

var movies = itemsjs.search({
  per_page: 1,
  is_all_filtered_items: true,
  filters: {
    tags: ['1980s']
  }
})

@cigolpl Thanks, I added an option to make it optional.

cigolpl commented 2 years ago

Looks great! I've bumped version to itemsjs@2.1.11 so you can now install from npm repository