Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter requin1989

    (@requin1989)

    Hi Mikko,

    I was just about to post, but then I saw you replied first.
    I solved it now by trimming the post content to about 20.000 characters. This should be enough to capture the table of content with relevant keywords to make the documents findable in the search.

    Nevertheless, I’ll try your improved code to make it even faster! I’ll tell you if there are any issues with it.

    Thank you for your great support! ??
    Requin

    Thread Starter requin1989

    (@requin1989)

    Dear Mikko,
    indeed, this seems to be the issue! Disabling custom excerpts makes the search considerably faster. Unfortunately, it was already fixed to “30 words” before, so that I have to completely deactivate it.
    Is there maybe a kind of workaround to make it somehow work? These custom excerpts are a really comfortable function… would be sad to have to do without it.
    In any case, thank you already for your help! ??
    Requin

    Thread Starter requin1989

    (@requin1989)

    Additional information: Besides the long text in my posts, I include PDFs in an iframe in every post. The reason is that I would like to have the PDFs displayed in the post, but at the same time have them searchable (thus, the extracted PDF text is in a hidden div, which can be searched by Relevanssi).

    Maybe the inclusion of the PDFs in an iframe could also be an issue which causes the Relevanssi search to be so slow?

    A typical post looks like:

    <div class ="hidden"> --- PDF extracted text --- </div>
    <div id="pdfviewer">
    <iframe class="pdf_document" src ="/wp-content/pdf.js/web/viewer.html?file=URL.pdf">
    </iframe>
    </div>
    • This reply was modified 7 years ago by requin1989.
    • This reply was modified 7 years ago by requin1989.
    Thread Starter requin1989

    (@requin1989)

    Dear Mikko,

    thank you very much for your quick response ??

    I just tried it with one-word search terms. It appears to make a difference whether the search term is common; the QueryMonitor report below comes from the search term “asd” (nonsense), whereas a search for “technology” results in an internal server error (probably timeout). I know that there is a blog post which should be found with the search term “technology” (a long one), so the commonness of a search term might make a difference.

    I got two reports of queries reported to be slow by QueryMonitor; their indicated “time” is however not the real time of the search query, which took about 30 seconds.

    Does this give you additional insights? ??

    Query 1:

    SELECT DISTINCT(relevanssi.doc), relevanssi.*, relevanssi.title * 10 + relevanssi.content + relevanssi.comment * 0.75 + relevanssi.tag * 5 + relevanssi.link * 0 + relevanssi.author + relevanssi.category * 3 + relevanssi.excerpt + relevanssi.taxonomy + relevanssi.customfield + relevanssi.mysqlcolumn AS tf
    FROM wp_relevanssi AS relevanssi
    WHERE (term LIKE '%asd'
    OR term LIKE 'asd%')
    AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID)
    FROM wp_posts AS posts
    WHERE posts.post_type NOT IN ('revision', 'nav_menu_item', 'custom_css', 'customize_changeset', 'feedzy_categories', 'mt_pp')))
    OR (doc = -1))
    ORDER BY tf DESC
    LIMIT 500

    Caller: relevanssi_search()
    wp-content/plugins/relevanssi/lib/search.php:513

    Time: 0.0911

    Query 2:

    SELECT COUNT(DISTINCT(relevanssi.doc))
    FROM wp_relevanssi AS relevanssi
    WHERE (term LIKE '%asd'
    OR term LIKE 'asd%')
    AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID)
    FROM wp_posts AS posts
    WHERE posts.post_type NOT IN ('revision', 'nav_menu_item', 'custom_css', 'customize_changeset', 'feedzy_categories', 'mt_pp')))
    OR (doc = -1))

    Caller: relevanssi_search()
    wp-content/plugins/relevanssi/lib/search.php:550

    Time: 0.1447

    Thread Starter requin1989

    (@requin1989)

    Thanks ??

    Thread Starter requin1989

    (@requin1989)

    I guess I would have to edit one of the Feedzy main functions, and put in something like “If the feed url = https://news.google.com/news/rss/search/section/q/*/*?hl=en&ned=us&output=rss, replace * by the name of the current user.
    But where do I find this Feedzy function to edit?

Viewing 6 replies - 1 through 6 (of 6 total)