Skip to content

Searching a collection group through textSearchController #571

Description

@faizanabidnaqvi

Hi!

I am not sure if this is a bug or a feature request. I tried using textSearch on a collection group by adding textSearchEnabled: true to the group. I also set up a search index based on the path. This resulted in showing the search bar in a collection group view.

However, I can't make it work. Seems like the data source searches based on a path like 'locale' so when we return ids from the text search controller, it will look for a doc like locales/[id] in firebase which is incorrect for a collection group based on a subcollection.

It would be nice if we could return a full doc path instead of just an id through the textSearchController; so we can return something like testDocs/flAzEev0jUq9G9YONPuX/locales/en-US and show the searched entities in the collection group view. This can be accomplished in Algolia either by setting the objectID to the full path or adding an additional path field in Algolia for an entity.

I understand that I can accomplish this through a custom data source which I will be trying in a couple of days but not sure if the collection group view will handle it correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions