Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => PostgreSQL and SQLite Support => Topic started by: stomic on February 09, 2009, 11:52:47 AM

Title: Forum search with SMF 2.0RC1 and SQLite
Post by: stomic on February 09, 2009, 11:52:47 AM
Hi,

Did anybody test forum search with 2.0RC1?
I'm getting the following error:

Wrong value type sent to the database. Array of integers expected. (message_list)
Title: Re: Forum search with SMF 2.0RC1 and SQLite
Post by: karlbenson on February 11, 2009, 01:27:37 PM
Search has been tested with sqlite.

Did i read in the other topic that you have converted to smf.
If so that is likely to cause issues.

In Settings.php where it says database type, have you changed it to say mysql instead of sqlite?
In Admin > Search > Search Method

What search method are you using?
If using fulltext or custom you might want to drop the index, and rebuild it.
Title: Re: Forum search with SMF 2.0RC1 and SQLite
Post by: greyknight17 on February 27, 2009, 10:42:11 PM
stomic, is this issue resolved now?
Title: Re: Forum search with SMF 2.0RC1 and SQLite
Post by: stomic on March 02, 2009, 10:20:35 AM
Hi, I'm sorry for not responding earlier, I didn't have "reply notification" turned on and I didn't know that there was a response.

So OK, I've been trying to figure out the real cause and haven't been able to do anything yet. I've manually built some missing indexes in the database as I thought that might be the cause.

I'm going to post now the scenarios I have tried.

In the attachment of this post is the first configuration which gives the following message on search:

Database Error
SQL logic error or missing database
near "RLIKE": syntax error
File: /home/othersid/public_html/recnik/forum/Sources/SearchAPI-Custom.php
Line: 219
Title: Re: Forum search with SMF 2.0RC1 and SQLite
Post by: stomic on March 02, 2009, 10:23:23 AM
second configuration: force search index use

Error:
An Error Has Occurred!
Wrong value type sent to the database. Array of integers expected. (message_list)
Title: Re: Forum search with SMF 2.0RC1 and SQLite
Post by: stomic on March 02, 2009, 10:34:27 AM
third configuration: no index use

An Error Has Occurred!
Wrong value type sent to the database. Array of integers expected. (message_list)
Title: Re: Forum search with SMF 2.0RC1 and SQLite
Post by: stomic on March 02, 2009, 10:36:24 AM
Match whole words only:     Off

An Error Has Occurred!
Wrong value type sent to the database. Array of integers expected. (message_list)
Title: Re: Forum search with SMF 2.0RC1 and SQLite
Post by: stomic on March 02, 2009, 10:48:14 AM
OK, so that covers it, more or less I guess.

@regularexpression:
in Settings.php:
$db_type = 'sqlite';

I tried recreating an index, but note that it says "size: N/A" for everything. I don't know if this might be a sign of something?

I think the only difference that I still have from the SQLite template db you supply with SMF 2.0RC1 is regarding some primary keys - I have used unique indexes on these columns instead, but I believe that should not cause problems since on the sqlite.org website I found this:

http://www.sqlite.org/lang_createtable.html
... The PRIMARY KEY attribute normally creates a UNIQUE index on the column or columns that are specified as the PRIMARY KEY....

might be that I'm wrong though...
Title: Re: Forum search with SMF 2.0RC1 and SQLite
Post by: karlbenson on March 02, 2009, 12:15:38 PM
It will say N/A for sqlite, because sqlite doesn't have a way to report the size of a table.
(postgresql the same atm, although i've recently posted a possible fix for that).

Title: Re: Forum search with SMF 2.0RC1 and SQLite
Post by: stomic on March 02, 2009, 12:20:40 PM
I don't have time now to dive into the code and debug the execution.
If it works OK by default, it might be good to write a script which will import the data either from semi-valid SQLite database which could be my case, or from MySQL/PostgresQL database.

This might be useful for other users too, that are thinking of changing the underlying database.
Title: Re: Forum search with SMF 2.0RC1 and SQLite
Post by: karlbenson on March 02, 2009, 12:21:38 PM
I'll do some more debugging later with sqlite.
Title: Re: Forum search with SMF 2.0RC1 and SQLite
Post by: stomic on March 02, 2009, 12:29:41 PM
Great! thank you!
Title: Re: Forum search with SMF 2.0RC1 and SQLite
Post by: greyknight17 on March 16, 2009, 04:15:37 PM
stomic, is there any update on this issue?