Topic on Project:Support desk

Rebuild SearchIndex after DB Migration

7
Cbo0485 (talkcontribs)

I recently followed the instructions found at http://www.linuxintro.org/wiki/Migrating_mediawiki_from_mysql_to_sqlite to move my database form MySql to SQLITE3.  In doing this, everything went pretty smoothly, however searches just don't work anymore.  The only way a search works is if I have the exact name of the page, in my search.  Obviously this removes the best benefit of a search.  I found through some research that I need to try to rebuild the searchindex table, but to do this I need to run the update.php.  When I do this, I get an error.  Anyone know how to get around this so I can try to rebuild my searchindex?

MediaWiki 1.25.1 Updater

Your composer.lock file is up to date with current dependencies!

Going to run database updates for wikidb

Using SQLite file: '/path/to/our/db/sqlite3/wikidb.sqlite'

Depending on the size of your database this may take a while!

Abort with control-c in the next five seconds (skip this countdown with --quick) ... 0

Turning off Content Handler DB fields for this part of upgrade.

...have ss_active_users field in site_stats table.

...ss_active_users user count set...

...have ipb_allow_usertalk field in ipblocks table.

Adding initial indexes ...PHP Notice:  Uninitialized string offset: 0 in /path/to/ourwiki/wiki/includes/db/Database.php on line 2717

Notice: Uninitialized string offset: 0 in /path/to/ourwiki/wiki/includes/db/Database.php on line 2717

PHP Notice:  Uninitialized string offset: 0 in /path/to/ourwiki/wiki/includes/db/Database.php on line 2717

Notice: Uninitialized string offset: 0 in /path/to/ourwiki/wiki/includes/db/Database.php on line 2717

A database query error has occurred.

Query: CREATE TABLE archive_tmp (

 ar_id NOT NULL PRIMARY KEY clustered IDENTITY,

 ar_namespace INTEGER NOT NULL DEFAULT 0,

 ar_title NVARCHAR(255) NOT NULL DEFAULT '',

 ar_text NVARCHAR(MAX) NOT NULL,

 ar_comment NVARCHAR(255) NOT NULL,

 ar_user INTEGER NULL REFERENCES [user](user_id) ON DELETE SET NULL,

 ar_user_text NVARCHAR(255) NOT NULL,

 ar_timestamp TEXT NOT NULL DEFAULT GETDATE(),

 ar_minor_edit BIT NOT NULL DEFAULT 0,

 ar_flags NVARCHAR(255) NOT NULL,

 ar_rev_id INTEGER,

 ar_text_id INTEGER,

 ar_deleted BIT NOT NULL DEFAULT 0,

 ar_len INTEGER DEFAULT NULL,

 ar_page_id INTEGER NULL,

 ar_parent_id INTEGER NULL

 )

Function: DatabaseBase::sourceFile( /path/to/ourwiki/wiki/maintenance/sqlite/archives/initial-indexes.sql )

Error: 1 near "clustered": syntax error

MarkAHershberger (talkcontribs)

What version of sqlite are you using?

Cbo0485 (talkcontribs)

sqlite3 --version

3.6.20

Cbo0485 (talkcontribs)

Don't like bumping threads, but i'm really stuck at this point, anyone seen this before and know how to fix it?

MarkAHershberger (talkcontribs)

I got similar errors, but hadn't chased them down. Is there a reason you want to use SQLite?

Cbo0485 (talkcontribs)

Unfortunately don't have a choice in the matter, MySQL being pushed out and this was the quickest path to getting something done.

Evilninja (talkcontribs)

Had the same problem and was stuck with Debian/Stretch sqlite3-3.16.2 which seemed to be unable to understand the clustered keyword. Upgrading to sqlite3-3.26.0 (via stretch backports) helped and I was able to run the MediaWiki 1.29.1 Updater. Yay! \o/