It’s not possible to enable is_searchable: true globally by default for all collections, but there’s a simple workaround you can use by creating a small base class and inheriting from it in your custom collections.
Here’s how:
Create a shared base collection class (lib/forest_liana/collections/forest_collection.rb)
class ForestLiana::Collections::ForestCollection
include ForestLiana::Collection
def self.collection(collection_name, opts = {})
opts[:is_searchable] = true unless opts.key?(:is_searchable)
super(collection_name, opts)
end
end
Then use it in your collection definitions
class ForestLiana::Collections::User < ForestLiana::Collections::ForestCollection
collection :User
...
end
With this setup, is_searchable will be true by default unless you override it explicitly.