Topic on Project:Support desk

Pedrogolino (talkcontribs)

Hi everyone,

I installed mediawiki 1.26.2 with MSSQL 2008 and I am having some issues with search.

The table [mediawiki].[searchindex] contains data (seems encrypted), but the query that searchs on it has the raw value of the search.

Is there any configuration or known bug with MSSQL ?

thanks

AKlapper (WMF) (talkcontribs)

What does "the query that searchs on it has the raw value of the search" mean? Can you provide a specific example with a complete list of steps to reproduce?

Pedrogolino (talkcontribs)

I'm sorry about the lousy explanation.

For example:

I search for "product" .

In searchindex table, the column si_text has a values like this: "瀠楲믯獢猲汱污".

The query generated by mediawiki is:

SELECT TOP 20 page_id, page_namespace, page_title, ftindex.[RANK]FROM [mediawiki].[page],FREETEXTTABLE([mediawiki].[searchindex] , si_title, 'product', LANGUAGE 'English') as ftindex WHERE page_id=ftindex.[KEY] AND page_namespace IN (0,2,6,8,10,12,14,3000,3100,3200,3201,3202,3203,4000,5000,5100,5200,5300,5900,6000,6100,6200,6900,7000) ORDER BY ftindex.[RANK] DESC

So, I have no result from it.

Ciencia Al Poder (talkcontribs)

MSSQL is not really supported, it's somewhat supported on LTS versions but not on latest stable. I'd say it's a bug, but you can fill one and make it a blocker of task T11767

87.123.28.202 (talkcontribs)

Compatibility does not even list MSSQL. The RELEASE-NOTES file in fact lists MSSQL as supported database management system. However, it is not used very widely and trying to use it there are a few flaws, which you would not run into, if you used MySQL. From my experience, changing to MySQL/MariaDB often is less trouble han trying to get MSSQL issues fixed in MediaWiki.

Donkeydash (talkcontribs)

Hi. In case anybody finds it helpful I fixed this by amending the function 'update' in includes\search\SearchMssql.php.

Assinging the variables $si)title and $si_text is the two lines I replaced as follows:

$si_title =  $this->db->addQuotes($title);

$si_text = $this->db->addQuotes($text);

This means that the searchindex fields are not stored as UTF-8 byte order but I'm okay with that.I do think that using MySQL would have been a *lot* easier but unfortunately that wasn't an option for me...

Reply to "Search Query"