• A few days ago Relevanssi was working just fine on my website. But today I noticed that every search results in “no-results”

    If I enable debug is true I get the following errors:

    WordPress database error: [Out of memory (Needed 1048548 bytes)]
    SELECT COUNT(DISTINCT(relevanssi.doc)) FROM jaba_relevanssi AS relevanssi
    
    WordPress database error: [Out of memory (Needed 1048548 bytes)]
    SELECT COUNT(DISTINCT(relevanssi.doc)) FROM jaba_relevanssi AS relevanssi WHERE relevanssi.term = 'school' AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM jaba_posts AS posts WHERE posts.post_type IN ('post', 'page', 'attachment', 'inzendingen'))) OR (doc = -1))
    
    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3]
    SELECT COUNT(DISTINCT(relevanssi.doc)) FROM jaba_relevanssi AS relevanssi WHERE (relevanssi.term LIKE 'school%' OR relevanssi.term_reverse LIKE CONCAT(REVERSE('school), %')) AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM jaba_posts AS posts WHERE posts.post_type IN ('post', 'page', 'attachment', 'inzendingen'))) OR (doc = -1))
    
    WordPress database error: [Out of memory (Needed 1048548 bytes)]
    SELECT COUNT(DISTINCT(relevanssi.doc)) FROM jaba_relevanssi AS relevanssi WHERE (term LIKE '%school' OR term LIKE 'school%') AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM jaba_posts AS posts WHERE posts.post_type IN ('post', 'page', 'attachment', 'inzendingen'))) OR (doc = -1))
    
    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3]
    SELECT COUNT(DISTINCT(relevanssi.doc)) FROM jaba_relevanssi AS relevanssi WHERE (relevanssi.term LIKE 'school%' OR relevanssi.term_reverse LIKE CONCAT(REVERSE('school), %')) AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM jaba_posts AS posts WHERE posts.post_type IN ('post', 'page', 'attachment', 'inzendingen'))) OR (doc = -1))

    State of the Index:
    Documents in the index:
    Terms in the index: 4483
    Highest post ID indexed: 2043

    (I only have 80 posts, because I just started my website) Could you please help solvinf the problem?

    Regards,
    Monique

    https://www.ads-software.com/plugins/relevanssi/

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

    (@msaari)

    There are odd errors in your database queries:

    CONCAT(REVERSE(‘school), %’))

    Is this a direct copy-paste? Because that should be

    CONCAT(REVERSE(‘school’), ‘%’))

    Something’s off there. As for the out of memory errors, there’s little that can be done there. If 80 posts is causing out of memory errors, you’re probably better off with a search solution that is external to your site, for example Swiftype or Addsearch.

    Thread Starter MoniqueR

    (@moniquer)

    Hello Mikko,

    I I enable debug in my wp-config this is indeed the message that gets displayed in screen. What can be wrong? I did not change any code of changed anything in the database and it worked before.

    Plugin Author Mikko Saari

    (@msaari)

    Do you have any filter functions that affect Relevanssi?

    Thread Starter MoniqueR

    (@moniquer)

    I do have a few filter functions in my funtions.php.
    If it is relevant to post or email them, please let me know

    Plugin Author Mikko Saari

    (@msaari)

    If they affect Relevanssi, then yes, they may contain some clues to why Relevanssi is not working properly.

    Thread Starter MoniqueR

    (@moniquer)

    That is not the problem. I just tested it by disbaling them and used a ‘fresh’ functions.php….

    Thread Starter MoniqueR

    (@moniquer)

    Update, I have disabled every plugin, switched theme to Twenty Fourteen but it makes no difference.
    I also enabled debug=true and no errors appear anywhere except in backend on relevanssi page (/wp-admin/options-general.php?page=relevanssi/relevanssi.php) and in front-end on search result page

    Backend on top of page:
    WordPress database error: [Out of memory (Needed 1048548 bytes)]
    SELECT COUNT(DISTINCT doc) FROM jaba_relevanssi
    On bottom of page:
    WordPress database error: [Out of memory (Needed 1048548 bytes)]
    SELECT COUNT(DISTINCT(doc)) as cnt, term FROM jaba_relevanssi GROUP BY term ORDER BY cnt DESC LIMIT 25

    Plugin Author Mikko Saari

    (@msaari)

    Looks like your site just might not be compatible with Relevanssi, then.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Memory errors’ is closed to new replies.