Skip to content

Instantly share code, notes, and snippets.

View wnm's full-sized avatar
😀

Wolfram Müller wnm

😀
  • https://presskithero.com
  • Freiburg, Germany
View GitHub Profile
@wnm
wnm / searchkick_and_elasticsearch_guidance.md
Created November 13, 2023 09:31 — forked from JasonTrue/searchkick_and_elasticsearch_guidance.md
Searchkick and Elastic Search guidance

Resources:

https://github.com/ankane/searchkick

Indexing

By default, simply adding the call 'searchkick' to a model will do an unclever indexing of all fields (but not has_many or belongs_to attributes).

In practice, you'll need to customize what gets indexed. This is done by defining a method on your model called search_data

def search_data