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

import UploadAdapter from './upload_adapter';
function CustomUploadAdapterPlugin( editor ) {
editor.plugins.get( 'FileRepository' ).createUploadAdapter = ( loader ) => {
// Configure the URL to the upload script in your back-end here!
return new UploadAdapter( loader, editor );
};
}
import { Controller } from "stimulus"
@font-face {
font-family: 'open_sansregular';
src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAGC0ABMAAAAAsGAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABqAAAABwAAAAcZf59mUdERUYAAAHEAAAAHgAAACABFwAER1BPUwAAAeQAAASiAAAJmCwaFlhHU1VCAAAGiAAAAIEAAACooF6Ikk9TLzIAAAcMAAAAYAAAAGCg5ZmGY21hcAAAB2wAAAGGAAAB2s9AWKBjdnQgAAAI9AAAAEYAAABGE4kNCWZwZ20AAAk8AAABsQAAAmVTtC+nZ2FzcAAACvAAAAAQAAAAEAAVACNnbHlmAAALAAAATJAAAJD4OZaxXGhlYWQAAFeQAAAAMwAAADYHWLaWaGhlYQAAV8QAAAAfAAAAJA9zBj9obXR4AABX5AAAAjcAAAOm2kNYqmxvY2EAAFocAAABzAAAAdZtXErgbWF4cAAAW+gAAAAgAAAAIAIHAZduYW1lAABcCAAAAeoAAARORjKS6nBvc3QAAF30AAAB7QAAAuUaeDKocHJlcAAAX+QAAADIAAABdkDIrc53ZWJmAABgrAAAAAYAAAAG+L9UZQAAAAEAAAAAzD2izwAAAADJNTGLAAAAANCLqT542mNgZGBg4ANiCQYQYGJgBMKXQMwC5jEAAA5NARwAAHjarZZLbFRVGMf/M51hxoKWqtH4CBoyNrUGjQ1J27GwatpaDZZpi4MOig/iAkJCY0hMExaFgbgwIQYrOTxqCkyh0FmQUpryMkxXLNzhaW3jyuVJV8QFIY6/c9sp4EjVxHz55dw597vf43/OPXMVklSpbn2qSEvru916/rOvenep5oveHTtVv+uTL3droyL4qFiU9/0316GdO3p3K+6vAiIKB2NcoXhv4Lldt3QrdDg0ELoDd8PpcA6mw7+GcxWrw+mKfTAW+Sl
def ruby_method
puts "Hello world! Posterous now supports gists!"
end