Posted on

Free 3.0

The free version of Relevanssi got a long-delayed update, and it turned out to be a major update, probably the biggest ever in the history of Relevanssi. Just look at the changelog… Most of these are, of course, familiar to the Premium users.

  • WORD OF WARNING: This is a major update, with lots of changes as you can see, and since I couldn’t find any beta testers to help test it out, consider this a beta release, with bugs probable.
  • The database has been updated to match the more advanced structure in Relevanssi Premium. This requires a re-indexing of the database.
  • The indexing process is more efficient now.
  • Relevanssi now includes a throttle feature, which makes the searches more efficient.
  • Relevanssi now disables the default WP search.
  • The custom field search hack using cat set to “custom” doesn’t work any more. If you wish to filter by custom field, you need Relevanssi Premium, which does it better anyway.
  • Relevanssi can handle certain whitespace characters better in indexing.
  • Apostrophes are now replaced with whitespace instead of being removed.
  • Relevanssi now shows correct number of results when posts_per_page is set to -1.
  • Fuzzy search didn’t always activate when it should, if all found posts are private posts that can’t be shown to user.
  • Tab characters in excerpts are handled better now.
  • Relevanssi search logs will now store user ID’s and IP addresses for each query.
  • You can now use user logins as well as numeric ID’s to stop user from being logged.
  • Attachments are now handled better. I’d still like to hear any complaints about attachments.
  • Relevanssi now updates index for posts added with wp_update_post() function. (Thanks to Simon Blackbourn)
  • Searching for pages in admin didn’t work properly. Fixed that.
  • Fixed warnings for undefined variables.
  • Relevanssi won’t mess media library searches any more.
  • Search terms are no longer highlighted in titles on post pages. That caused too many problems.
  • New collation rules to MySQL databases will make sure that word pairs like “pode” and “pôde” will not be considered duplicates in the stopword database.
  • You can now set the “Custom fields to index” to “all” to index all custom fields and “visible” to index all visible custom fields (but not the ones with names starting with an underscore).
  • Plugin now works properly without multibyte string functions.
  • You can now choose to allow HTML tags in excerpts.
  • New filter: relevanssi_modify_wp_query lets you modify $wp_query before it is passed to Relevanssi.
  • New filter: relevanssi_search_ok lets you adjust when search is enabled.
  • New filter: relevanssi_pre_excerpt_content lets you adjust post content before excerpt creation.
  • New filter: relevanssi_excerpt_content` lets you adjust post content before excerpt creation, but after `the_content.
  • New filter: relevanssi_ellipsis lets you change the default ‘…’ in excerpts to something else.
  • New filter: relevanssi_do_not_index is given a post ID and expects a boolean in return: should this post be indexed or not?
  • New filter: relevanssi_match lets you meddle with the matching engine.
  • New filter: relevanssi_results filters the result set from the search.
  • New filter: relevanssi_content_to_index let’s you add whatever content you wish to posts before they are indexed.
  • New filter: relevanssi_didyoumean_query let’s you modify the query for Did you mean? queries
  • Changed filter: relevanssi_post_ok has different arguments, see source code for details.
  • New shortcode: use shortcode noindex to wrap parts of posts you want to keep from the index.
  • And a bunch of other changes.

The biggest change is in the plugin structure, however. From now on, free and Premium share the same underlying code base. I’ve taken the large single plugin file apart and split most of the functionality into smaller units in the lib folder – there’s one file for search, one for indexing, one for excerpts and so on – and these are the same for both versions of the plugin.

Of course free version just didn’t get all the Premium functionality. The files are filled with references to functions that only exist in the Premium version and provide the extra features that people are paying for. There will be more of those, too.

To me this is a major change to an easier direction. When there’s a bug in Relevanssi, it’s quite likely I have to make a single change in one place, and then just copy the fixed lib file to the other version. That’s very simple compared to what I had to do earlier.

The new version is now available in the plugin repository.

I’m currently working on version 1.8.3 of Premium, based on the new code base, but I just want to add some sweet new features to it, so I’m not releasing it quite yet.

32 comments Free 3.0

      1. Hey,

        just wanted to tell you that it is working again. I had to disable, enable, disable and enable it. Guess the reason is something different but it works now.

        Thanks and keep up the good work!
        Cheers!

    1. Try one more thing: check your indexing options. It may be that those checkboxes are empty (they shouldn’t be, but that has already happened to few people). In that case checking them will make indexing work.

      You can download earlier versions from the plugin depository.

          1. Mikko, I had Custom Querystring Reloaded installed, but it wasn’t activated. I tried activating it and setting the results to 5, then to 10, no change. Deactivated and uninstalled CQS.

            Also had Results Count plugin installed. Deactivated it, that didn’t fix it. Deleted it, that didn’t fix it.

            I am using Weaver 2.0 theme.

      1. That does not sound like a database error, more like a problem with the search results template. The results exist, but the paging on your search results template doesn’t.

        1. Ok, I am following you. If I turn Relevanssi off so that WordPress is using the built-in search function, I see the navigation links. I replaced search.php with the unmodified original from the Weaver 2.0 theme, but still I have no nav links.

          1. Where do those navigation links come from? Are they default WP navigation, or something else? If it’s something else, it can be that something else is not compatible with Relevanssi.

  1. Mikko, I am using Weaver 2.0 theme, and I don’t know if they use the default navigation or not. Whatever the case… it all worked before the upgrade. At a loss now, and am going without Relevanssi. May try to install the previous version and just go with that. Just for kicks, I installed the new version of Relevanssi on one of my other blogs, but ran into a whole different set of problems. This time it refuses to index the posts.

    1. Well, unless I know what kind of navigation your blog is using, I can’t know why it doesn’t work with Relevanssi anymore. The default WP page navigation does work with Relevanssi 3.0.

      On your other blog, check the indexing options – do you have any post types checked for indexing?

      1. Missed those check boxes on the other site. Indexed fine this time, thanks. This site, just like the other… no navigation links now. It also uses Weaver 2.0 theme. Honestly no idea this theme uses the default nav or not, and how I’d know. Is there another plugin that will change the navigation? If you want to look at the nav links, maybe you can tell if they are defaults or not. Just go to my site (linked in my comment name) and do a search. Thanks for all your help!

  2. Dave, I installed the Weaver 2 theme and the search works just fine. The navigation doesn’t look at all like the one on your site, though, it’s just the standard Prev/Next and not a list of pages, and it works fine without any changes.

    That kind of page list navigation is more likely to break, because it needs to find out the number of pages, and if it’s not done right, it will either break completely or show the wrong number of pages (based on WP search, not on Relevanssi search).

    Are you perhaps using WP-Pagenavi? Looks like Weaver has automatic support for WP-Pagenavi – do you have that plugin installed? Or WP-Paginate?

    1. Interesting… I don’t have WP-Pagenavi installed in my list of plugins, but the functions.php file has it in there. There is no call to it in search.php, yet it was working anyway. Commenting the Pagenavi function out makes Relevanssi work again, so that indeed was the problem. However, I can’t let my site go live with the default navigation so I guess this is a “deal breaker” for using the current version of Relevanssi… too bad, I was looking forward to using the custom fields feature. Thanks again for your help! I’ll revert back to the previous version.

        1. Actually, the free version works with WP-Pagenavi, I tried. Perhaps the solution is to actually install the plugin? If your functions.php calls the plugin, yet you don’t have it, that would explain why the navigation would just disappear.

          1. Just tried that, and it works! Looks like you were correct. I was installing various other navigation plugins, none worked at all, but the new WP-Pagenavi does work. Thank you, I’ll be making a donation, thanks for your help! Relevanssi rocks!

  3. Hi there, we recently updated to 3.0 and we cant get any results with relevansii.

    I checked the template, there is no query_posts.
    I deactivated and reactivated the plugin several times, no luck neither.
    I rebuilt the index, no luck.

    We use the same plugin version in other website and works perfectly, the only difference we found is that the first one is behind a folder password ( .htaccess and .passwd)

    We rolled back to 2.9.14 and everything is back to working. However do you think the password is the porblem? we really cant think of anything else at the moment.

    Thanks in advance for any ideas.

      1. thanks for the reply, i just tried 3.0.2 and i got the same problem as with 3.0.1.

        As before i checked the templates for any query_posts, deactivated and reactivated the plugin and rebuilt the index.

        I still cant think of anything else that makes this website or theme so different to other websites i have done in the past using relevanssi.

    1. oh im sorry, i forgot to check back. Well it indexes correctly, the problem in my case is for the search.

      Also i just tried 3.0.3 and i still get the same problem. It indexes wonderfully, but i get no results when i try to make a search.

      As before no query_posts anywhere int he search.php template, deactivate and activated several times.

      What else can i tell you … we have been using relevanssi for the past 3 years (?) and we love the custom taxonomies search feature, hats the reason we started to use it in first place.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.