[beginner] Linking 'company_id' to its actual value(s)

Hi all, :wave:

Algolia is incredible, I’m having a blast installing it since this morning on my Rails app; A lot of improvement since this morning but I’m stuck on what feels like a beginner’s question. Here we go:

I have an index Booking which has a user, who belongs to a company.

    booking {
      reference: 123soleil
      user: {
        id:  1
        email: 123soleil@mail.com
        created_at: 2018-02-14T11:06:12.633+01:00
        updated_at: 2018-02-15T12:17:46.911+01:00
        first_name: Marcel
        last_name: Samba
        company_id: 2           #<-- here ! -->
        branch_id: 3

I would like in my search to be able to find the booking by writing the company’s name.

What am I missing ? How can I replace my company_id’s id by a new hash with the company name, etc ?

Thanks in advance for your help :pray:

Ok my bad; Here is the relevant doc for those of you stumble who stumble on this question :


1 Like