#community-help

Resolving Attribute Issue with Instantsearch Adapter

TLDR Stefan had a problem using the Instantsearch adapter for multi-index searches. Jason suggests a workaround and asks for a Github issue to be opened. Issue was opened by Stefan and will be reviewed by Jason.

Powered by Struct AI
10
29mo
Solved
Join the chat
Apr 13, 2021 (29 months ago)
Stefan
Photo of md5-d6c265b4792dbf0a1d6ae378f39d8736
Stefan
11:36 AM
it works if both indexes have the same attribute
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:09 PM
cc Jason
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
03:24 PM
Stefan are you using the instantsearch adapter?
Stefan
Photo of md5-d6c265b4792dbf0a1d6ae378f39d8736
Stefan
05:23 PM
Yes
Apr 14, 2021 (29 months ago)
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:22 AM
Stefan You could instantiate two instances of instantsearch, and two instances of the adapter with different queryBy s.
Stefan
Photo of md5-d6c265b4792dbf0a1d6ae378f39d8736
Stefan
05:41 AM
doable not pretty though. I guess that would also mean that 2 queries are necessary instead of one
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:51 AM
Yeah not ideal. Could you open a Github issue, with a code example showing the widgets you're using to do multi index search?
Stefan
Photo of md5-d6c265b4792dbf0a1d6ae378f39d8736
Stefan
09:03 AM
I will do that
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:11 PM
Perfect, thank you. I’ll look into it shortly.