Comments (3)
Hey @aleincerto,
Thanks for contacting us. I investigated the above and this is definitely a valid point you're making. What you're trying to do is currently not documented, and we'll make sure to add this soon.
So to answer your question:
The addResultHandler
is one way to do it indeed.
In order to do make it work with custom widgets, you need your custom widget to implement the protocol SearchableMultiIndexViewModel
, which basically requires you to add a property searcherIds: [SearcherId]
. You need to fill this property with the indices that you want the widget to "tune into". When you do so, the on()
method should be called for all the indices specified. Note that you'll also need to implement func configure(withSearchers searchers: [Searcher])
, but you can leave it empty if you don't need to use the searchers
associated to that widget.
Also note that as soon as you're using multi-indexing with InstantSearch, then your custom widget will have to implement SearchableIndexViewModel
in case they're targeting only 1 index (what I explained right above is for multiple indices). Here you'll have to add the property searcherId: SearcherId
and implement func configure(with searcher: Searcher)
.
Thanks again for reporting this and let us know if you face any issue.
from instantsearch-ios.
Thanks a lot for the help! I might come back to you with some other questions later on. This InstantSearch framework is really good, nice stuff that you have going on in here. Keep it up.
from instantsearch-ios.
Thank you for the nice comment! Make sure to contact us if you face any other issues, we're always looking for feedback and ways to improve the library.
from instantsearch-ios.
Related Issues (20)
- Recommendation like Get Trending Global Items in iOS
- Add custom JSONDecoder property to HitsInteractor HOT 2
- Pagination for HitsController not working sometimes in iOS HOT 3
- Incorrect facet selected attribute value on Hierarchical filter HOT 1
- Incorrect number of hits on HitsInteractor when using pagination (infinitescroll) HOT 4
- Wrong issue
- Add the possibility to map the index data model to a custom data model when fetching hits HOT 2
- Empty queries conditional display not working in HitsObservableController
- SwiftUI: Setting automaticallyShowsCancelButton HOT 1
- Reporting a vulnerability
- Sequence extension with `sorted(by:)` function should be internal HOT 1
- The app references non-public selectors `didToggleSwitch` and `didSelectSegment` warning when uploading to AppStore Connect HOT 1
- Can't disable Insights HOT 2
- Not able to pass dynamic attribute to FacetList Connector ?
- Xcode warnings for InstantSearchInsights
- EXC_BAD_ACCESS (code=1, address=0xf69aa6f6bd70) in HOT 1
- HitsObservableController not clearing out old results after applying filter HOT 2
- HitsList returning Scrollview
- Breaking changes in dependencies HOT 9
- Removing Logging from dependences makes build failures HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from instantsearch-ios.