Express advanced search attribute option list

Related to a question I asked last week about express attributes and search:

If I use advanced search on an express entity it gives me a list of available attributes to search by. When I pick one that I know doesn’t have the Field available in advanced search box checked and click search it (predictably) throws an error saying that column doesn’t exist in the search table.

Weirdly, because of that error, if I don’t reset the search window afterward, it causes the results page for that entity to error out. My assumption is because the search was saved, it’s still trying to look up an attribute that doesn’t exist for searching when I visit the page. Resetting the CONCRETE5 cookie returns everything to normal, so not like it isn’t fixable.

Are all express entity attributes available in the advanced search drop-down regardless of their searchability status, or is there something that will update that list of options to show only the searchable ones?

Seems like a bug to me. You probably shouldn’t have the option of searching attributes which are not set up to be searchable.

As for resetting the search, you can remove the query string parameter with the attribute key handle in it (should be right after the question mark):

field%5B%5D=attribute_key_<handle>

The only existing issue I can find about something like this recommends ensuring that the “content included in search index” option is selected if you want to use it in the queries.

Is there a reason why you are trying to search attributes which are not searchable? There may be a way to avoid the problem.

I’m searching in the express dashboard pages, so there’s no query string to remove from the URL. It’s not that I’m purposefully trying to search on an attribute that is not marked as searchable. I’m just surprised I’m allowed to when I think I should not be. And if I don’t remember what I can and can’t search on, I could easily run into this issue trying to filter results for something.