Support » Plugin: Relevanssi - A Better Search » Certain pages don’t show up in search results

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

    (@msaari)

    I tried looking for the first post, and I can’t actually find it for any searches, phrases or not. For example searching for “Principles of miracles” without quotes does not find it. This seems to apply all of these posts. That would suggest a wider issue than just phrase searching.

    So, I’d start by checking if the posts are actually indexed. If you look at the Relevanssi database table (wp_relevanssi), do the posts appear there? If you search for their post ID in the doc column, can you find them?

    If not, then the question is why. Any indexing exclusions in play that could apply here?

    JD

    (@jutta0303)

    Hi Mikko,

    Thank you. I searched the wp_relevanssi database table for the 4 different pages that aren’t working. I’ve dumped the results which you can look at here.

    I’ve dumped the results for the following page/post IDs (scroll through the above linked page to see all the results):
    250
    255
    259
    270

    Those 4 are the ones that don’t work. For comparison, I’ve dumped the results for post ID 6419 as well, which is a page for which the Relevanssi search works just fine.

    Can you see anything unusual?

    Thank you!

    Plugin Author Mikko Saari

    (@msaari)

    This proves this is a searching issue, not an indexing issue. It seems those posts are indexed perfectly fine.

    Do the first two steps outlined here. What do you get from those when you search for, say, “misperception”?

    JD

    (@jutta0303)

    Hi Mikko,

    Thank you! I tried those two things. I’ve uploaded the results here (for “misperception” in quotes) and here (for misperception without quotes).

    See anything?

    Plugin Author Mikko Saari

    (@msaari)

    Nothing weird there. Bunch of excluded posts, which don’t match the post in question, and a taxonomy restriction blocking taxonomy with the taxonomy term ID 1. Which term that is? Could that block the page from the search?

    If you run the MySQL query directly in the database using phpMyAdmin or Adminer, do you get any results?

    JD

    (@jutta0303)

    Hi Mikko,

    Thank you! It seems that the taxonomy ID 1 is for “category”. See screenshot.

    I tried to run the MySQL query directly in the database, but I’m not sure exactly how to do that. Do you have instructions for this? I Googled around a bit but I think I’m a bit too unfamiliar with working inside databases.

    Thank you so much!

    Plugin Author Mikko Saari

    (@msaari)

    In phpMyAdmin, choose the right database and open the SQL tab. Then in the SQL box enter

    SELECT DISTINCT(relevanssi.doc), relevanssi.*, relevanssi.title * 5 + relevanssi.content * 6 + relevanssi.comment * 0 + relevanssi.tag * 0.75 + relevanssi.link * 0 + relevanssi.author + relevanssi.category * 0.75 + relevanssi.excerpt + relevanssi.taxonomy + relevanssi.customfield + relevanssi.mysqlcolumn AS tf FROM wp_g78h97mya3_relevanssi AS relevanssi WHERE relevanssi.term = 'misperception' AND relevanssi.doc NOT IN (SELECT DISTINCT(tr.object_id) FROM wp_g78h97mya3_term_relationships AS tr WHERE tr.term_taxonomy_id IN (1)) AND relevanssi.doc != 5 AND relevanssi.doc != 6007 AND relevanssi.doc != 2333 AND relevanssi.doc != 2488 AND relevanssi.doc != 6 AND relevanssi.doc != 4 AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM wp_g78h97mya3_posts AS posts WHERE posts.post_type NOT IN ('revision', 'nav_menu_item', 'custom_css', 'customize_changeset', 'oembed_cache', 'user_request', 'et_pb_layout'))) OR (doc = -1))

    and click go. What does that return?

    Plugin Author Mikko Saari

    (@msaari)

    Term taxonomy ID 1 points to term ID 1, which is probably “Uncategorized”. However, you don’t have any uncategorized posts, so that exclusion does nothing. It does slow down the queries a bit, so if you have “Uncategorized” checked in the “Category exclusion” settings in the Relevanssi Searching settings, I would recommend unchecking it.

    JD

    (@jutta0303)

    Thank you so much, Mikko.

    Here’s a screenshot of the page in phpMyAdmin.

    Here’s an SQL dump of the whole thing.

    Does that show you anything?

    Plugin Author Mikko Saari

    (@msaari)

    Check those posts that are missing from the search results: looks like they just might be in the “Uncategorized” category, and that’s why they’re not appearing in the search, because you’ve excluded the “Uncategorized” posts.

    JD

    (@jutta0303)

    Hi Mikko,

    Thank you so much! It doesn’t seem to be that they’re “Uncategorized” posts… all of those links are actually Pages on the site, not Posts. I looked through everything on the pages and nothing seems to be pointing to them being uncategorized in any way.

    I wasn’t sure what else to do, so I made 4 new pages with the same content/setup as the 4 mentioned in my original post. Then made the original pages into Drafts and published the 4 new pages. They all now show up in the search results. No idea what happened there…

    Thank you so much for hanging in there with me and helping me troubleshoot this. Seems like this issue was beyond Relevannsi—possibly some kind of database issue, not sure.

    Jutta

    JD

    (@jutta0303)

    Wow, well, just to double-check something, I just looked at the source code of the pages that didn’t show up in the search results and I found this:

    <meta property="article:section" content="Uncategorized" />

    I have no idea how that go into the code, but this goes along with your suspicion! So weird!

    • This reply was modified 1 year, 11 months ago by JD.
    • This reply was modified 1 year, 11 months ago by JD.
Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Certain pages don’t show up in search results’ is closed to new replies.