How to remove the field from where the condition in magento 2?

in error log : Column not found: 1054 Unknown column 'show_in_custom_assistance' in 'where clause'.

$collection = $this->_autoSearchCollection->create();
    // echo $collection->getSelect();

    return $collection;

I have tried the $collection->removeAttributeToSelect('show_in_custom_assistance'); and $collection->removeFieldFromSelect('show_in_custom_assistance'); but didn't worked.

1 Answer 1


I found the solution myself. Just make the attribute not searchable so that the attribute will not come in the search filter.

Your Answer

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

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