Skip to content

Conversation

@jkazimierczak
Copy link

Changes Summary

I was just getting started with Sequin and TypeSense, so I was following this guide: https://sequinstream.com/docs/quickstart/typesense and noticed a couple improvements that could be made:

  • Typesense could be bumped to (0).29.0 (there's even typesense/typesense:30.0.rca32, which I used and it worked for the products example, but I assume docs want to point to non-RC version),
  • For me http://host.docker.internal:8108 wasn't working, but I had success with specifying Typesense container name directly (added it as alternative Host in the docs),
  • The default transform function doesn't work and results in an Error:
def transform(action, record, changes, metadata) do
  Map.take(record, ["id", "name", "price"])
end

Error: [sink_pipeline]: Document's id field should be a string.

After updating it to:

def transform(action, record, changes, metadata) do
  record
  |> Map.take(["id", "name", "price"])
  |> Map.update("id", nil, fn id ->
    cond do
      is_binary(id) -> id
      is_integer(id) -> Integer.to_string(id)
      true -> to_string(id)
    end
  end)
end

it worked as expected. Mind you that I'm no Elixir guy, so the above was generated with GPT using the prompt that was in the settings.

There's one more thing that I didn't edit: in "Step 6. Configure Typesense" it mentions Collection. Seems this field was moved to "Routing". While it's quite intuitive after a minute, it would be good to note this change in the future.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. documentation Improvements or additions to documentation labels Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant