This issue applies to the following search fields:
"Work Search" in the header
"Search within results" in the work filters
"Any Field" on the work search page
"Any field on work" on the bookmark search page
"Search within results" in the bookmark filters
Currently, if you'd like to search by language using any of the above fields, you need to use the syntax language_id: 1, where the number corresponds to the id of the Language in the database.
To make this more user-friendly, we'd like to make it so you can enter either language_id: en (where en is the Language short name) or language_id: 1 to get all English works. (The latter is necessary to avoid breaking bookmarked searches.)
We’ll need to reindex all works so the language_id field uses the short name. This is necessary to avoid and allow users to search for works in multiple languages, e.g. language_id: en OR language_id: zh to get works in either English or Chinese.
Note that if you use the old numerical id (language_id: 1) in your search, you should see the new short name (language_id: en) in the search field after performing your search.
How to test:
Check that the language dropdown still works as expected in the work search page and on the work filters.
Check that the language dropdown still works as expected in the bookmark search page and on the bookmark filters.
Check that the field "Search within results" in work filters work by using the language_id hidden search operator.
You can filter for 1 language with language_id: X.
You can filter for multiple languages with language_id: X OR language_id: Y
Repeat 3 for "Any Field" on the work search page.
Repeat 3 for "Any field on work" on the bookmark search page.
Repeat 3 for "Search within results" in the bookmark filters.
The hidden search operator should handle both new arguments (language short names) and old arguments (language database IDs). Here are some you can use: