• Hello Mikko,
    Thanks for working on this plugin. My Woocommerce products are not showing up. I had a look at the wordpress posts table and the field that Relevanssi Light should create is missing. The thing is that my wordpress table is not named wp_posts but xx_posts (xx are 2 other letters). I was wondering if it could be the reason. I would like to index my woocommerce products.

    My config :
    Wordpress Multisite 5.7
    PHP 7.4
    Database 5.5.5-10.3.28-MariaDB
    Woocommerce 5.1

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Mikko Saari

    (@msaari)

    The different database prefix is not a problem, Relevanssi Light uses the prefix your site uses.

    Is Relevanssi Light installed as a network plugin or on just single site? What is the value of the relevanssi_light_activated option for this site?

    Thread Starter fabien789

    (@fabien789)

    Thanks for your reply.

    Is Relevanssi Light installed as a network plugin or on just single site?
    It’s installed as a network plugin but I also tried to activate it on a single site (I saw that it worked for someone else).

    What is the value of the relevanssi_light_activated option for this site?
    I didn’t find anything that contains “relevanssi” in the database but I found this in relevanssi-light.php :

    function relevanssi_light_activate() {
    	add_option( 'relevanssi_light_activated', 'yes' );
    }
    
    /**
     * Runs the relevanssi_light_database_alteration_action() function through an
     * AJAX action to make it run as an async background action (because it takes
     * a long time to run).
     */
    function relevanssi_light_install() {
    	$plugin_active_here = false;
    	if ( is_plugin_active_for_network( 'relevanssi-light/relevanssi-light.php' )
    		&& 'done' !== get_option( 'relevanssi_light_activated' ) ) {
    		$plugin_active_here = true;
    	}
    	if ( is_admin() && 'yes' === get_option( 'relevanssi_light_activated' ) ) {
    		$plugin_active_here = true;
    	}
    	if ( $plugin_active_here ) {
    		update_option( 'relevanssi_light_activated', 'done' );
    		relevanssi_light_launch_ajax_action(
    			'relevanssi_light_database_alteration'
    		);
    	}
    }
    Plugin Author Mikko Saari

    (@msaari)

    If there are no Relevanssi Light options in the database, then there’s some problem in the plugin activation. It may be there’s some problem with the plugin activation in multisite when installing to an existing site.

    The activation process is fortunately simple to kickstart manually. On the site, add the option relevanssi_light_activated and set the value of the option to yes. Then visit any admin page, and that should add the Relevanssi Light column to the database and kick off the fulltext indexing.

    Thread Starter fabien789

    (@fabien789)

    Thanks for your fast reply. Actually I made a mistake while searching in the database. I do have these options in both sites of my wordpress multisite :

    relevanssi_light_activated : done
    relevanssi_light : a:1:{s:18:"mysql_version_good";b:1;}

    I tried setting the value to yes and process all posts but nothing changed (except relevanssi_light_activated goes back to done). I still don’t have the fulltext index and the search engine doesn’t work. I continue to investigate.

    • This reply was modified 3 years, 10 months ago by fabien789.
    • This reply was modified 3 years, 10 months ago by fabien789.
    • This reply was modified 3 years, 10 months ago by fabien789.
    Plugin Author Mikko Saari

    (@msaari)

    Ok, so if the setting is set to done, that means Relevanssi Light has at least attempted to do the changes in the database.

    There’s one catch: because it can take some time to do the database modifications, Relevanssi Light uses an asynchronous ajax action to do that. It’s possible this ajax action has not succeeded for some reason.

    You can make the database modifications manually:

    https://gist.github.com/msaari/7454dcbfb667f0ee746e21f302a4bd10

    After that the search should work.

    • This reply was modified 3 years, 10 months ago by Mikko Saari.
    • This reply was modified 3 years, 10 months ago by Mikko Saari.
    Thread Starter fabien789

    (@fabien789)

    Hello Mikko,

    So I’ve done what you recommend and the new fields are created as expected. Nonetheless, they remain empty after I process all posts and the search still don’t work. I was using Relevanssi on the exact same environment (https://www.spendways.com/fr/) and everything works so it’s hard to understand what could block Relevanssi light.. If you have an idea let me know. I can still go back to Relevanssi even though I like the idea of better performances ??

    Fabien

    Plugin Author Mikko Saari

    (@msaari)

    The column should remain empty, unless you specifically add something to it. Having the FULLTEXT index is more important, because that’s what Relevanssi Light does to improve the search.

    Relevanssi Light actually doesn’t do anything about the search. It’s all done by your database server, Relevanssi Light just instructs it to use the better index. So, if the search is not working at all, there’s probably something wrong in the database query. What does the search MySQL query look like? (Query Monitor will show you.)

    Relevanssi and Relevanssi Light work in a completely different way, so it’s not impossible that one works and the other doesn’t, they have really nothing in common in how they work.

    Thread Starter fabien789

    (@fabien789)

    Hello Mikko,

    Sorry for the delay. I’m done migrating my website and I’m now working with the hosting company to find a solution. I might revert to Relevanssi if it’s easier. I’ll let you know.

    Fabien

    Hello guys, maybe a little tricky bit is the fact that

    update_option( 'relevanssi_light_activated', 'done' );

    is set BEFORE relevanssi_light_database_alteration tries to alter database. If the ajax request fails (for any reason, e.g. SSL checks on local installation) the plugin will not ever try to create necessary columns but proclaims installation as ‘done’.

    Plugin Author Mikko Saari

    (@msaari)

    Indeed. I probably need to add one more level there (‘working’ and then ‘done’ when it’s actually done, not before).

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘relevanssi_light_fulltext index missing’ is closed to new replies.