duplicated entries into search_index (word, sid, type, score)

Alex72RM - July 8, 2008 - 08:45
Project:Views Fast Search
Version:5.x-2.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi,

I'm configuring an Italian website with views fast search module, used to improve search speed.

I noted that after cron runs, sometimes I obtain user warnings, and always on accented words ("così", "rientrò", "perché",...):

* user warning: Duplicate entry '5-cosi-node-0' for key 1 query: INSERT INTO nfov2search_index (word, sid, type, score) VALUES ('cosi', 5, 'node', 0.4347572815534) in ...\includes\database.mysql.inc on line 172.
* user warning: Duplicate entry '5-rientrò-node-0' for key 1 query: INSERT INTO nfov2search_index (word, sid, type, score) VALUES ('rientrò', 5, 'node', 0.31973451327434) in ...\includes\database.mysql.inc on line 172.
* user warning: Duplicate entry '741-perchè-node-0' for key 1 query: INSERT INTO nfov2search_index (word, sid, type, score) VALUES ('perchè', 741, 'node', 0.47822742474916) in ...\includes\database.mysql.inc on line 172.

Maybe is it a new issue? How can I solve it?

Many thanks,
Alessandro

#1

Rhino - August 11, 2008 - 08:03

Related to this; (and some say it will be fixed in Drupal 6) - as far as I've understood it, it's an issue with the core search.

I have the same problem.

search_index has duplicate (sid, word, type, fromsid=0) entries
http://drupal.org/node/143160

duplicated entries into search_index (word, sid, type, score ...
http://drupal.org/node/279756

#2

Dabitch - December 8, 2008 - 13:27

I'm getting a boatload of these every time

user warning: Duplicate entry '146616-at-node-0' for key 1 query: INSERT INTO search_index (word, sid, type, score) VALUES ('at', 146616, 'node', 0.28027027027029) in /PATH/includes/database.mysql.inc on line 174.

user warning Duplicate entry '146616-funky-node-0'; for key 1 query: INSERT INTO search_index (word, sid, type, score) VALUES ('funky', 146616, 'node', 0.28027027027027) in /PATH/includes/database.mysql.inc on line 174.

Etc and so on. I've tried _everything_ mentioned in the other posts linked above, creating a non unique index and all. This has been going on for me since Drupal 4.7 and I keep hoping it will be sorted by the next upgrade. Is there a fix for this in Drupal 5.12 and if not, why not? Is there anywhere I can find out exactly what the problem is?

Please not that these are not words with exotic letters with accents, apostropes or other exotic chars.

#3

Dabitch - December 8, 2008 - 14:05

Also, Rhino that first link ( http://drupal.org/node/143160) that you show suggest to do this to diagnose if you have 'the problem'

SELECT word, sid,
TYPE , count(  *  )
FROM search_index
WHERE fromsid = 0 AND sid < 10000
GROUP  BY word, sid,
TYPE  HAVING count(  *  )  > 1;

I get no results returned when I do this, but I have unlimited php errors in my sites logs stating user warning: Duplicate entry. So why am I getting the duplicates?

 
 

Drupal is a registered trademark of Dries Buytaert.