Skip to content

Using querySuggestionsPlugin with Typesense #3

@MantraMedia

Description

@MantraMedia

I am not sure if this is the same problem as typesense/typesense#570 but I can not get the suggestion plugin to work with Typesense.

I think the problem is that it does not have a getSources functionality to override Algolia

The error passing the client directly is:

Cannot read properties of undefined (reading 'addAlgoliaAgent')

I somehow could go further in passing

searchClient: typesense.collections('test_index').documents()

and adding the needed q parameter in getSearchParams:

getSearchParams() {
  return { q: '*' }
},

but this results in an error as the format from Algolia is different

0: {"indexName":"test_index","query":"","params":{"hitsPerPage":5,"highlightPreTag":"__aa-highlight__","highlightPostTag":"__/aa-highlight__","q":"*"}}

Did somebody ever get the querySuggestionsPlugin to work with Typesense?

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