What happened?
Indexer encountered a duplicate entry and terminated
- Steps to reproduce: index any content where two items share a normalised term (e.g. accented name like "Sueño Stereo" that strips to a term already
- The exact error: Duplicate entry 'X-*' for key 'idx_term_language'
- File: administrator/components/com_finder/src/Indexer/Indexer.php ~line 524
- Fix: change INSERT INTO to INSERT IGNORE INTO
Version
5.4
Expected result
Ignore the duplicate and proceed
Actual result
Index creation terminated
System Information
No response
Additional Comments
The suggested fix would not work with PostgreSQL.
„Insert ignore“ is MySQL and MariaDB syntax. On PostgreSQL this causes an SQL syntax error. As Joomla also supports PostgreSQL, this PR cannot be accepted as it is.
See https://www.postgresql.org/docs/current/sql-insert.html
Besides that, I don’t think it would be the right fix. It would circumvent the issue but not fix the root cause.