Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test / Fix Relevanssi plugin and add to list of supported plugins #78

Open
mattbucci opened this issue Nov 26, 2023 · 2 comments
Open

Comments

@mattbucci
Copy link
Collaborator

https://wordpress.org/plugins/relevanssi/

Not working per: #73

@hahnn
Copy link

hahnn commented Mar 10, 2024

Tested and still not working because of the below SQL error:

[1710090580.6647] Error running :
CREATE TABLE wp_relevanssi (doc bigint(20) NOT NULL DEFAULT '0',
        term varchar(50) NOT NULL DEFAULT '0',
        term_reverse varchar(50) NOT NULL DEFAULT '0',
        content mediumint(9) NOT NULL DEFAULT '0',
        title mediumint(9) NOT NULL DEFAULT '0',
        comment mediumint(9) NOT NULL DEFAULT '0',
        tag mediumint(9) NOT NULL DEFAULT '0',
        link mediumint(9) NOT NULL DEFAULT '0',
        author mediumint(9) NOT NULL DEFAULT '0',
        category mediumint(9) NOT NULL DEFAULT '0',
        excerpt mediumint(9) NOT NULL DEFAULT '0',
        taxonomy mediumint(9) NOT NULL DEFAULT '0',
        customfield mediumint(9) NOT NULL DEFAULT '0',
        mysqlcolumn mediumint(9) NOT NULL DEFAULT '0',
        taxonomy_detail longtext NOT NULL,
        customfield_detail longtext NOT NULL DEFAULT '',
        mysqlcolumn_detail longtext NOT NULL DEFAULT '',
        type varchar(210) NOT NULL DEFAULT 'post',
        item bigint(20) NOT NULL DEFAULT '0',
        PRIMARY KEY doctermitem (doc, term, item)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci
---- converted to ----
CREATE TABLE IF NOT EXISTS wp_relevanssi (doc bigint NOT NULL DEFAULT '0',
        term varchar(50) NOT NULL DEFAULT '0',
        term_reverse varchar(50) NOT NULL DEFAULT '0',
        content mediumint NOT NULL DEFAULT '0',
        title mediumint NOT NULL DEFAULT '0',
        comment mediumint NOT NULL DEFAULT '0',
        tag mediumint NOT NULL DEFAULT '0',
        link mediumint NOT NULL DEFAULT '0',
        author mediumint NOT NULL DEFAULT '0',
        category mediumint NOT NULL DEFAULT '0',
        excerpt mediumint NOT NULL DEFAULT '0',
        taxonomy mediumint NOT NULL DEFAULT '0',
        customfield mediumint NOT NULL DEFAULT '0',
        mysqlcolumn mediumint NOT NULL DEFAULT '0',
        taxonomy_detail text NOT NULL,
        customfield_detail text NOT NULL DEFAULT '',
        mysqlcolumn_detail text NOT NULL DEFAULT '',
        type varchar(210) NOT NULL DEFAULT 'post',
        item bigint NOT NULL DEFAULT '0',
        PRIMARY KEY doctermitem (doc, term, item));
----> ERREUR:  erreur de syntaxe sur ou près de « doctermitem »
LINE 20:  PRIMARY KEY doctermitem (doc, term, item));
                      ^
---------------------

Here there is clearly an issue of conversion about the PRIMARY KEY. In fact, if a name is given to the primary key in the same SL instruction where we have the CREATE TABLE, this name should be removed. So instead of having this:

PRIMARY KEY doctermitem (doc, term, item));

We should have that:

PRIMARY KEY (doc, term, item));

The second issue is the data type mediumint which is not existing in PostgreSQL, that we can see several times here. mediumint is a very strange thing invented in MySQL, to represent an integer on 3 bytes (instead of 2 or 4).

It must be replaced by the integer PostgreSQL data type.

@mattbucci
Copy link
Collaborator Author

still needs to be retested with latest and added to list of supported plugins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants