Data Visualisation in my Forest Dashboard, on specific models only
Observed behavior
I have setup a multisearch using PGSearch on two of my models, User and Address, with a PGSearch document generated in my postgres DB. Since then, my dashboard returns a 500 when I try to display these models’ indexes. Other models not included in PGSearch are displayed without trouble.
Expected behavior
Visualizing my models’ indexes correctly.
Failure Logs
Forest Records Index error: uninitialized constant ForestLiana::UserSpace::PgSearchDocumentSerializer
Context
Please provide in this mandatory section, the relevant information about your configuration:
Project name: depozen
Team name: depozen
Environment name: development
Agent type & version: Where can I find it ?
Recent changes made on your end if any: use of PGSearch multisearch
I am indeed using the forest_liana gem in Rails 6.1.4 / Ruby 2.7.4
I configured a multisearch based on two models. This multi search creates a PGSearch Document that is referenced in my DB. This document is then referenced in my models. In my forestadmin-schema.json this is materialized by { "field": "pg_search_document", "type": "Number", "default_value": null, "enums": null, "integration": null, "is_filterable": true, "is_read_only": false, "is_required": false, "is_sortable": true, "is_virtual": false, "reference": "PgSearch__Document.id", "inverse_of": "searchable", "relationship": "HasOne", "widget": null, "validations": [] }
However the models cannot be loaded due to this references to a table that on the other hand is not referenced in my schema.rb models.
The multisearch is the problem since it creates a search document through the command PgSearch::Multisearch.rebuild(Address, User) in which Address and User instances are referenced.