Slackbot
08/18/2023, 3:22 PMJason Bosco
08/18/2023, 4:49 PMJason Bosco
08/18/2023, 4:49 PMJainil Sutaria
08/23/2023, 8:05 PMJason Bosco
08/23/2023, 8:56 PM_buildSearchParameters to a public method, so you can use it by instantiating SearchRequestAdapter. Do you want to do a PR that renames that method to transformSearchParameters?Jainil Sutaria
08/23/2023, 8:56 PMJainil Sutaria
08/23/2023, 11:11 PM{
"profiles": {
"range": {
"mixed_profile.years_of_experience": "3:4"
},
"refinementList": {
"mixed_profile.skills": [
"C++"
]
},
"menu": {
"segments.id": "kpu9rfNB"
},
"configure": {
"filters": "(mixed_profile.location: NY)"
}
}
}
It seems as though _buildSearchParameters (or transformSearchParameters ) uses the instantsearchRequest.params to transform "algolia params" into "typesense params", so basically the parsing of the uiState into these params is already built into instantsearch.
Wouldn't it be better for the instantsearchadapter to use the uiState directly instead of using algolias params to convert into the typesense params? Detaching from the double-conversion could allow for the implementation of features like multiple geo filters (which algolia only limits to one field).
For my use case, exposing of the transformSearchParameters into a public method would be very useful, but I'd still have to dig around instantsearch to find where uiState is converted into the algolia params (or also possibly build that myself, which isnt a huge deal considering low # of filter types)Jainil Sutaria
08/23/2023, 11:12 PMJason Bosco
08/24/2023, 12:13 AMWouldn’t it be better for the instantsearchadapter to use the uiState directly instead of using algolias params to convert into the typesense params?If it’s available sure, but I don’t think the uiState data structure is available within the searchClient context… Instead Algolia only sends the resolved search params.