#community-help

Bug Found in InstantSearch Widget's Operator

TLDR em1nos noted a possible bug with the InstantSearch widget's default operator. Jason confirmed the bug and promptly issued a fix, to which em1nos confirmed the resolution.

Powered by Struct AI

3

1

1

17
31mo
Solved
Join the chat
Jul 12, 2021 (31 months ago)
em1nos
Photo of md5-f33ae8b829901656b655c985c894be3a
em1nos
07:07 PM
so, this InstantSearch widget will not work with its default "OR" operator, right?
https://www.algolia.com/doc/api-reference/widgets/refinement-list/vue/
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:08 PM
It does... I've used it before
07:08
Jason
07:08 PM
Are you seeing any issues?
07:11
Jason
07:11 PM
It should work with the AND operator as well
em1nos
Photo of md5-f33ae8b829901656b655c985c894be3a
em1nos
07:13 PM
07:14
em1nos
07:14 PM
something seems off yea ..
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:14 PM
Oh boy, that's a bug I introduced in the latest pre-release version 😞
07:15
Jason
07:15 PM
Instead of escaping each value in the list, the entire set of values are escaped
07:15
Jason
07:15 PM
Will push out a fix for it shortly
em1nos
Photo of md5-f33ae8b829901656b655c985c894be3a
em1nos
07:16 PM
heey I'm finding bugs, I'm a contributoir 😄

1

1

07:16
em1nos
07:16 PM
thanks Jason!
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:17 PM
The one thing I thought was a super straightforward change and skipped adding tests for, is the one where a bug crept in!
em1nos
Photo of md5-f33ae8b829901656b655c985c894be3a
em1nos
07:18 PM
there you go, at least you knew imediately what the issue was 🙂

1

Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:36 PM
Alright, I've published the fix in v2.0.0-2
07:36
Jason
07:36 PM
and wrote a test for it 😬

1

em1nos
Photo of md5-f33ae8b829901656b655c985c894be3a
em1nos
07:40 PM
works! thank you! 🙂

1

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3005 threads (79% resolved)

Join Our Community