algolia / react-instantsearch

⚡️ Lightning-fast search for React and React Native applications, by Algolia.
https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react/
MIT License
1.97k stars 386 forks source link

Documentation for algoliaClient field #572

Closed sheerun closed 5 years ago

sheerun commented 6 years ago

Could you provide documentation for algoliaClient parameter? What methods/fields should it expose? What are shapes of parameters and responses?

Do you want to request a feature or report a bug? documentation

Feature: What is your use case for such a feature? Providing custom algoliaClient so I can make it return results make from combined Algolia Places results (https://community.algolia.com/places/rest.html ) and my custom dataset.

Haroenv commented 6 years ago

You should be able to do that without providing a separate client, by having a places index in your appID; then you can use the multi-index feature: https://community.algolia.com/react-instantsearch/guide/Multi_index.html

Regardless of that, the custom algoliaClient should have:

Implemented as like the https://github.com/algolia/algoliasearch-client-javascript

search will be called every time something changes in the state of RIS.

Does that make sense? Feel free to ask more information!

sheerun commented 6 years ago

thanks for writing this :) could you document these two methods on the documentation page?

Haroenv commented 6 years ago

did it work for what you were planning to use it for @sheerun ?

sheerun commented 6 years ago

I didn't have time to do it yet. Is it relevant to this issue? It's about documentation, not fixing my problem :)

samouss commented 5 years ago

The algoliaClient prop is now deprecated in favor of searchClient. To know more about the signature of the prop you can take a look at the guide dedicated to back-end search. The guide is about proxying Algolia though a backend but the same concept apply for a custom frontend only client.