typesense

Is it possible in typesense to search with connections?


Is it possible in Typesense to make complex search requests with connections, like in GraphQL?

As example, I have a collection with customers and a collection with projects. In a search request, should my client now see the name of the project and also the name and address of the customer. So, is it possible that I get this information in the same query? I mean, my goal is that I can declare the customer-id in the project-document to get this data too.

Btw, I know I can write in every project-document also the data from the customer, but it's not so comfortable when the customer address or place will change because then I must update every project with the new customer data.

Schema customers

[
   { name: 'name', type: 'string' },
   { name: 'address', type: 'string' },
   { name: 'place', type: 'string' }
]

Schema projects

[
   { name: 'name', type: 'string' },
   { name: 'description', type: 'string' } 
]

Solution

  • This is not possible in Typesense as of v0.22, so you would have to flatten the data across collections into a single collection.

    But there is an open issue to track this request here: https://github.com/typesense/typesense/issues/229