Topic: impossible to add word to search index

Hi,
I recently change of hosting and made a dump of my database to import it on my new website.
I met problem when importing in pn_search_words so i decide remove the table in the exported dump and imported the dump like that.
All went well but now ; sometimes when i post in the forum i meet the following error :

forum/include/search_idx.php
Ligne : 149

PunBB a rapporté : Impossible d'ajouter les mots index de recherche

La base de données a rapporté : Duplicate entry 'passé' for key 1 (Errno: 1062)

so i tried to reindex the searching engine by truncate the pn_search_words once again and rebuild the index but the problem is still there hmm
even with the rebuild index i meet the error Duplicate Entry.

Any suggestion ?

Re: impossible to add word to search index

See if it's already in? tongue

Re: impossible to add word to search index

elbekko wrote:

See if it's already in? tongue

ho i did not think of it how stupid i am ...

any another suggestion from someone else ?

Re: impossible to add word to search index

1. PunBB version?
2. UTF-8?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

5 (edited by foxmask 2006-04-05 10:26)

Re: impossible to add word to search index

1 . punBB 1.2.11
2 . i dont know the encoding as i'm using mysql4 hmm


EDIT >
3 . MySQL 4.0
4. charset  : LATIN1.

Re: impossible to add word to search index

the exported dump was from a MySQL 5 database in UTF-8 .

Re: impossible to add word to search index

as my new hosting use MySQL 4.0 ; i cant change the charset like that :
SET CHARACTER SET utf8
because MySQL 4.0 did not know this chartset yet.
utf8 is known since 4.1...

Re: impossible to add word to search index

It's difficult to say really. We've encountered a similar problem before, but it was adressed. I would have to debug the error and see what actually happens.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: impossible to add word to search index

actually i've asked to my hosting provider if its possible that they upgrade from mysql 4.0 to 4.1 and i could change the charset to utf-8.
but now i really dont know how to fix the problem with a specific workarround or something.

10 (edited by ImoTh3P 2006-04-06 12:18)

Re: impossible to add word to search index

Hi,

I could reply to you in french but as it's an english forum...

Are-you sure that the AUTO_INCREMENT parameter is still present for this table?

Re: impossible to add word to search index

ImoTh3P wrote:

Hi,

I could reply to you in french but as it's an english forum...

Are-you sure that the AUTO_INCREMENT parameters is still present for this table?

yes :

Field        Type                     Null       Key                 Default        Extra
id              mediumint(8) unsigned           MUL                 NULL     auto_increment
word           varchar(20)                       PRI

12 (edited by foxmask 2006-04-06 20:18)

Re: impossible to add word to search index

I think the problem is fixed :
what i did is :
i followed the rules explained on this page admin_maintenance.php and each time the process stopped with the previous message i returned to the admin_maintenance.php page added 1 to the next ID as explain and continued until the process finished correctly.

13 (edited by foxmask 2006-04-07 08:41)

Re: impossible to add word to search index

Finally the problem is still here, i've made a post and got the error ...
as i'm fed up with this error i've dropped the call of the update_search_index of edit.php and post.php neutral
Search engine will not work at all ...

Re: impossible to add word to search index

@Rickard : on punbb.fr someone give me the solution.
the column word was not in binary mode.
i've exported the schema with phpmyadmin 2.8 fon a mysql5.x and imported with phpmyadmin 2.8 to mysql 4.
the exported column was always with binary mode but not after the import step.

so what we need to keep in mind is the BINARY on the word column wink

regards.

Re: impossible to add word to search index

Ah, yes. Now I remember. Someone else had a similar problem at one time. However, he used a different tool for migrating.

"Programming is like sex: one mistake and you have to support it for the rest of your life."