By default, all string fields are searchable (can be used in fields option). Speed up indexing and reduce index size by only making some fields searchable.
and
By default, all string fields are filterable (can be used in where option). Speed up indexing and reduce index size by only making some fields filterable.
But the ReadMe also says:
In your parent model, set:
class Animal < ApplicationRecord
searchkick inheritance: true
end
I tried filtering by type (a string field) without the inheritance: true and it didn't work. Searchkick also strangely mutates the string value when storing in ES. In ActiveRecord, the type column is stored like 'Networks::Track', but Searchkick mutates the string to be 'networks/track'
My suggestion is is to not say "all strings are filterable by default" and to document any mutations that happen between ActiveRecords and ElasticKick fields.
The ReadMe says:
and
But the ReadMe also says:
I tried filtering by
type
(a string field) without theinheritance: true
and it didn't work. Searchkick also strangely mutates the string value when storing in ES. In ActiveRecord, the type column is stored like'Networks::Track'
, but Searchkick mutates the string to be'networks/track'
My suggestion is is to not say "all strings are filterable by default" and to document any mutations that happen between ActiveRecords and ElasticKick fields.