Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multiple collections to be indexed in typesense #9

Closed
georgekamar opened this issue Jul 22, 2021 · 4 comments
Closed

Comments

@georgekamar
Copy link

Description

This is not a bug with the extension, but a request to add a feature that would allow support for multiple collections to be indexed into typesense. The configuration steps could allow an array or list of collections to be inputted, and a subarray for fields.

@jasonbosco
Copy link
Member

@georgekamar To sync multiple collections, you can actually install this extension multiple times in the same project and set different collection names, in each instance.

@georgekamar
Copy link
Author

That thought did cross my mind, but I wasnt sure if it was possible, how to manage that, and was hoping there was a way to achieve desired functionality in one installation.

p.s: tried copying the code and modifying locally, but for some reason functions.handler.firestore.document.onWrite(...) does not register as an event, despite it being in firebase's documentation

@jasonbosco
Copy link
Member

To install a 2nd instance of the extension, you'd just need to click on the Install Extension link in the README file of this repo and select your Firebase project as usual. Firebase will detect that you already have the extension installed and will prompt you to enter a new "extension instance id" like this:

Screen Shot 2021-07-23 at 3 12 34 PM

Besides that, everything about the installation procedure is the same.


p.s: tried copying the code and modifying locally, but for some reason functions.handler.firestore.document.onWrite(...) does not register as an event, despite it being in firebase's documentation

IIRC, functions.handler.firestore is a Firebase extension specific thing. To write your own handler in a firebase app, you want to use functions.firestore like this: https://typesense.org/docs/0.21.0/guide/firebase-full-text-search.html#step-3-write-data-to-typesense

@georgekamar
Copy link
Author

Thanks for the answers, very helpful !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants