Define the collection and fields
app/search_engine/book.rb
Do not declare
attribute :id. Use identify_by to control the Typesense document id.Set identity and defaults
app/search_engine/book.rb
identify_bycontrols the Typesense document id.query_bysets a per-model default for searches.schema_retentionkeeps old physical collections after swaps.
Nested fields
Use:object or [:object] with nested: to define subfields.
app/search_engine/book.rb