Hello,
can I automatically replace umlauts in search queries.
For example.
My tag in the images is "Haeuser".
But user searches for "Häuser"
I want to replace: ä -> ae
Can I do something like this via the local file editor?
Thank you
Oliver
Last edited by oliver_piwigo (2022-12-06 15:27:59)
Offline
Hello,
try this with the LocalFilesEditor.
$conf['sync_chars_regex'] = '/^[ äÄöÖüÜa-zA-Z0-9-_.,\'"^&+° #!?@$]+$/';
Slim
Offline
Thank you for the answer.
But this does not yet show the desired effect.
My IPTC entry has "ae" in the word. However, the user writes the word with "ä" in the search window.
Can I say exactly "ä" = "ae"?
Kind regards
Oliver
Offline
I think sync_chars_regex is to filter files and directories names.
I wonder if a good data base encoding could help solve this problem. Looks like it may be possible:
https://mariadb.com/kb/en/setting-chara … lations/#n
Can Piwigo rely on it?
Offline
My database encoding is utf8_general_ci
SELECT 'Mueller' = 'Müller' ; // returns 0 SELECT 'Mueller' = 'Müller' COLLATE 'utf8mb4_german2_ci' ; // returns 1
Here, there is a (french) utf8 IPTC tag in some pictures: œuf.
When œuf is searched in Piwigo (12.3) nothing is returned. When oeuf is searched, every œuf pictures are listed. Actually, piwigo tag is oeuf.
So somehow a tag translation has been made somewhere during importation (synchronization).
In your case, if it behaves like mine, even with IPTC tag Häuser in pictures, visitors would need to search haeuser to get the pictures list.
So I join you in a call for an improvement in search page behaviour. If this is confirmed, it would be worth checking this issue is on piwigo github.
Offline
Yes, there is still potential in the search.
There is the plug-in "RV Autocomplete". Here you can define variants for search words. This is going in the right direction. However, it only works for the quick search.
Offline