No search bar for some collections

Feature(s) impacted

Search bar in dashboard.

Observed behavior

In the dashboard, the search bar is not displayed for some of my collections.

Expected behavior

The search bar should appear for all collections.

Failure Logs

Console logs:

No failure logs in the web app logs.

Context

  • Project name: francaisavecmarcel
  • Team name: operations
  • Environment name: development/production
  • Database type: postgresql
  • Recent changes made on your end if any: NA

And, if you are self-hosting your agent:

  • Agent technology: (nodejs, php, ruby, python) : ruby / ruby on rails
  • Agent (forest package) name & version (from your .lock file): forest_liana gem v9.14.4

Hello @nico_lrx

You can bring the search bar back by explicitly adding is_searchable: true to your collection definition. For example:

class ForestLiana::Collections::User
  include ForestLiana::Collection

  collection :User, is_searchable: true

end

Let me know if you have any questions!

That worked, thanks! Is it possible to set is_searchable: true by default to all collections?

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.

Let me know if you’d like help setting that up!

2 Likes