1

I am trying to add full text search to a custom grid. I have done the following steps

  • added full text indexes to related columns in the table
  • in the ui component xml file, added <filterSearch name="fulltext"/> node (tried with and without description)

The search bar appears on the grid page, but when I search for something I get the following error in exception log

[2020-07-24 10:05:59] report.CRITICAL: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'fulltext' in 'where clause', query was: SELECT COUNT(*) FROM `aw_helpdesk_ticket` AS `main_table`
 INNER JOIN `aw_helpdesk_ticket_grid_flat` AS `flat` ON main_table.id = flat.ticket_id
 INNER JOIN `aw_helpdesk_department` AS `department` ON main_table.department_id = department.id WHERE (((`department_id` = '1'))) AND (((`fulltext` = 'test'))) {"exception":"[object] (Zend_Db_Statement_Exception(code: 42): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'fulltext' in 'where clause', query was: SELECT COUNT(*) FROM `aw_helpdesk_ticket` AS `main_table`
 INNER JOIN `aw_helpdesk_ticket_grid_flat` AS `flat` ON main_table.id = flat.ticket_id
 INNER JOIN `aw_helpdesk_department` AS `department` ON main_table.department_id = department.id WHERE (((`department_id` = '1'))) AND (((`fulltext` = 'test'))) at /Users/fkhan/Sites/TPM2/app/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:110, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'fulltext' in 'where clause' at /Users/fkhan/Sites/TPM2/app/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:91)"} []

1 Answer 1

0

make sure in your ui component file dataProvider element is exist and is proper as

<dataProvider class="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider" name="answer_listing_data_source">
            <settings>
                <requestFieldName>answer_id</requestFieldName>
                <primaryFieldName>answer_id</primaryFieldName>
            </settings>
        </dataProvider>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.