Forums

[resolved] [Plugin: Relevanssi] Can't Build Index (17 posts)

  1. bgajus
    Member
    Posted 2 years ago #

    I'm testing this plugin out to see if I will be able to use it. Having a problem however just getting started. When I try to build the index on the options page, the page reloads and stops after the title "Relevanssi Search Options". My current testing/development environment has me sitting under HTTPS. Could the form just be having a problem knowing where to send the form-data when a form is submitted?? How can I fix this?

    http://wordpress.org/extend/plugins/relevanssi/

  2. bgajus
    Member
    Posted 2 years ago #

    just wanted to add that when I click "Save the options" it works and saves the options....but the "Save indexing options and build the index" and "Continue indexing" don't work and I can't get it indexed. I'm also getting a blank page when I do a search on the site.

  3. msaari
    Member
    Posted 2 years ago #

    Sorry, can't help you... the same form saves the options and builds the index, so if one works, so should the other.

    Have you checked your server error logs?

  4. dreamwhisper
    Member
    Posted 2 years ago #

    having the same problem explained here on 2.9.2. It doesn't appear to index and goes to a blank page with Relevanssi Search Options on top after clicking save indexing options and build the index.

  5. msaari
    Member
    Posted 2 years ago #

    I've definitely succeeded in building the index with 2.9.2, so it's something about your local setup. Can you check the server error logs?

  6. Wealthed
    Member
    Posted 1 year ago #

    Doesn't work for me either, I click Save Index and it takes me to a blank page that just says "Relevanssi Options" and nothing more, I have tried waiting on that page for 30 minutes, I have tried clicking "continue indexing" several times, same result every time just a blank page and no index.

  7. msaari
    Member
    Posted 1 year ago #

    The reply remains the same: have you checked the server error logs? A blank page can be caused by many, many things, while an error message from the log might give me some tools to actually solve the problem.

    You definitely shouldn't have to wait 30 minutes, that's for sure, a server timeout will happen a lot earlier.

  8. bgajus
    Member
    Posted 1 year ago #

    Just an update....I think the problem was the mbstring extension was not installed on the host.

    I have another problem....checking the Index and search your posts' categories: and Saving the Options doesn't appear to work. When the page refreshes...it's not checked.

  9. msaari
    Member
    Posted 1 year ago #

    Yeah, I've gathered so far that blank page is most likely caused by missing mbstring extension. I'll add some warnings to the next version.

    You're correct about the option. A small bug in the code, it seems. I probably broke it in some update, as I'm sure it has worked before. Well, another reason to get 1.8.1 out as soon as possible. I'm on vacation next week, so expect a fixed version at some point during next week. Thanks for the bug report!

  10. bgajus
    Member
    Posted 1 year ago #

    Thanks msaari!

    Hey there is one other thing I was wondering if you could look into. I've found that with custom post types you can limit your search to a post type using <input type="hidden" name="post_type" value="post type name" /> just like you can similarly limit categories. Relevanssi seems to break this and just pull all posts from all post types. Would love for this to be working again.....or maybe you know of another way to do this and still have Relevanssi running.

  11. msaari
    Member
    Posted 1 year ago #

    Custom type support is definitely a work-in-progress. I simply wasn't aware of the feature, it's easy to add. This will be fixed in the next version. The documentation on these seems a tad scarce, or then I'm not looking in the right place.

    Also, I only found out after the release of 1.8 that custom types may dictate whether they should appear in the search or not. That's something I need to support as well.

  12. bgajus
    Member
    Posted 1 year ago #

    msaari -

    I found this little bit of code...

    function SearchFilter($query) {
      if ($query->is_search) {
        // Insert the specific post type you want to search
        $query->set('post_type', 'feeds');
      }
      return $query;
    }
    
    // This filter will jump into the loop and arrange our results before they're returned
    add_filter('pre_get_posts','SearchFilter');

    I was hoping it work for me in the time being until Relevanssi is updated. Been trying to filter out posts/pages from search results and only get results from a particular post type, similarly to using the hidden input. So far, I haven't got it to work with Relevanssi running.

  13. msaari
    Member
    Posted 1 year ago #

    There's a simple temporary solution. Find relevanssi_build_index(). It starts with a code that sets the $restriction variable.

    There's the default case, where $restriction is set to "". Set it to

    AND (post_type = 'your custom post type' OR post_type = 'another post type you want')

    (Put a space before the AND)

    Then re-index, and you won't have any posts or pages in the index, only the custom types you list.

  14. msaari
    Member
    Posted 1 year ago #

    bgajus, drop me an email at mikko () mikkosaari.fi, and I'll send you a version of Relevanssi that supports setting post_type from the search form. You can try and see if it works the way you expect it does.

  15. msaari
    Member
    Posted 1 year ago #

    Actually, forget about that. I just committed 1.8.1, which fixes this. Have fun!

  16. bgajus
    Member
    Posted 1 year ago #

    I'll give it a try here in a few and let you know. Thanks!!!

  17. bgajus
    Member
    Posted 1 year ago #

    Works perfectly!! Hands down the best search plugin for WP I've found. Relevanssi is a must for anyone using WP as a CMS. Thanks for your help and quick responses msaari!!!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags