FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » search bug?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
search bug? [message #168185] Thu, 21 February 2013 18:18 Go to next message
zbob is currently offline  zbob   United States
Messages: 19
Registered: February 2013
Karma: 0
Junior Member
I just installed about a month ago and starting posting some test messages. When I do a search sometimes I get correct results but mostly I just get nothing depending on the word searched. Its almost as if some words are in the search index and some are not. I am searching normal words like "child", "health", "survey", etc... some work, but most do not.

I did a rebuild search index from admin but that did not help. I also tried changing the search cache to smaller or larger values. That did not help either.

Any suggestions? Thanks.

Bob

FUDforum version: 3.0.4
PHP version: 5.3.10
PHP built on: Windows NT 206953-7 6.1 build 7601 (Windows Server 2008 R2 Datacenter Edition Service Pack 1) i586
Database type: mssql (sqlsrv)
Database version: 10.50.2500
Web server: Microsoft-IIS/7.5
Web server to PHP interface: cgi-fcgi

Re: search bug? [message #168187 is a reply to message #168185] Fri, 22 February 2013 13:44 Go to previous messageGo to next message
zbob is currently offline  zbob   United States
Messages: 19
Registered: February 2013
Karma: 0
Junior Member
Update:

We have nearly 100 messages in the system but there are only 70 words in the search table. Many many words are missing. Rebuilding the search index seems to have no effect. Still 70 records after each rebuild.

Any ideas what might be going on here?

Thanks.
Bob
Re: search bug? [message #168188 is a reply to message #168185] Fri, 22 February 2013 19:01 Go to previous messageGo to next message
zbob is currently offline  zbob   United States
Messages: 19
Registered: February 2013
Karma: 0
Junior Member
I think I may have this partially figured out. There is a unique contraint on the "search" table. This causes a db error when inserting duplicate words and stops the rebuild process. I dont know why the system is attempting to insert dupes but apparently it is. I turned the unique contraint off and rebuilt the search index and then all the words were inserted "correctly"... with dupes of course, but at least all the words are in there now and the forum search now seems to work.

I think this function is not working correctly: $w2 = array_unique($w2); (in isearch.inc)

Is there a better workaround than what I have done or is there a fix for this?

Thanks.

[Updated on: Fri, 22 February 2013 19:58]

Report message to a moderator

Re: search bug? [message #168192 is a reply to message #168188] Sun, 24 February 2013 13:43 Go to previous message
zbob is currently offline  zbob   United States
Messages: 19
Registered: February 2013
Karma: 0
Junior Member
It appears that the $w2 array is multi-dimensional and array_unique is not intended for multi-dimensional arrays. So I dont really know how to deal with dupes in the word list. It seems to work fine with the dupes there but just needed to make sure the search table in the database allows for duplicate entries in the word column. The standard FUDforum install for MS SQL Server puts a unique restriction on that column.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Rank Image issue
Next Topic: Bug in setting up phpFreeChat
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 01 03:10:56 GMT 2024

Total time taken to generate the page: 0.02610 seconds