itemsapi / itemsjs

Extremely fast faceted search engine in JavaScript - lightweight, flexible, and simple to use

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to filter down with "exact" match?

regisphilibert opened this issue · comments

I went through the readme extensively but could not find what I am looking for.

it seems that by default if I do

itemsJS.search({
  filters: [
     brands: ['toshi']
  ]
});

Every entries with brands

  • toshi
  • toshiba
  • kitoshi

will be returned as results.

Is there a way to only return entries which have the brand toshi?

Hey @regisphilibert, as far as I remember when I designed ItemsJS the filters should work in the "exact" mode. This behaviour sounds like a bug. I'll check it out in about 7 days

Hey @regisphilibert, I've told to you I'll check it out in 7 days. Sorry I didn't have time. It's on my todo list though

Don't worry about it, we put a workaround in place and it works great for now, so no rush on our part. Thanks for keeping me in the loop though!

What was the workaround @regisphilibert ? By coincidence I experienced the "bug" as well, just now.

Will issue a PR to fix it. it only happens when your data, brands in this case, is just a string (so no collection).