1 (edited by fpouget 2007-03-05 21:56)

Topic: small pb when editing a post or a subject in table search_words

I'm probably not the first one to report this one, but i couldn' find something similar ...

1 - Create a new topic something like "tagada123" as subject and "tagada789" as text.
2 - Edit the post and change the suject by "tagada321" and the text by "tagada987".
3 - Open the table search_words, sort it by word_id and both "tagada123" and "tagada789" are still in the table...

Is not a big issue because if you do a search you 'll find only "tagada321" and "tagada987", but it's increasing for nothing the table search_words.

Am I right ?

Re: small pb when editing a post or a subject in table search_words

I'm not sure it is a bug.
Before you delete a word from search_words, you have to ensure that it isn't being used in search_matches. In order to do that, you would need to check the entire search_matches table for the word you just deleted. So that's one extra select per word deleted and one extra delete for every word not found. Not exactly the most efficent, especially with larger search_words tables.
Rebuilding your search index will of course remove the extra words: I'm sure someone could also write a query to remove the unnecessary words as well.

I'll leave this here though for the other developers to look at. If they agree with me, they can move this to PunBB Discussion.


Free PunBB Hosting - lots of mods, easy to customize