Hi! I have a documentation issue on InstantSearch.js, I could not find how I can search in a second index, with the result of my first index.
I do a search in my first index, and I need one value from the result, to make a new search. Because I need that value as a searchAttribute -> filter, to get exactly one result from the second index. It is the ID of a dataset. I found this example: https://jsfiddle.net/j9nwpz34/27/ but It doesn't fit into my needs.
Any help or documentation for such a feature?
Cheers
Chris
e.g. First index will show me 10 results. So now I need the value of each of those results and have to do a new search in a second index to get more data to the first result. Like a relation between two indices.
What kind of interface are you thinking of now? I have trouble imagining how this would look :) Do you want to do an additional search for "related items" on every hit?
I have a map, an input field and the hits below the input field. After the site finishes loading, it shows me the first 10 results which is the expected behaviour. Those infos are coming from one index (my first index).
Unfortunately, related infos, to each hit of the result, is coming from an other index (address data e.g.) So now I have to make a search (automatically and via input field) to the second index, with the value from the hits to trigger a second search for each hit to an other index.
Yes "related info" for each hit is neede and those infos are coming from a second index. And I need to use one value (an ID) to use this id as a searchParameters: {filters:'idColumn:myValueFromFirstIndexFromHit1'}
If I understand correctly, for each result from your first index you want to do a secondary search. In that case, maybe you could use the connector for the hits. This way you can trigger another search for each of the result.
Yes, this is what I want. I will have a look into the connector. thx :)
Hey @Chris2011, did you get this to work as expected? If you're not there yet, it will be useful to put the current progress in a sandbox so we can take a look
@Haroenv unfortunately I didn't try it out yet. I will come back to you later :). Thx for inerests.
Closing for inactivity.