WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Relevanssi – A Better Search] Public post types don't appear in search results even wh

[Plugin: Relevanssi – A Better Search] Public post types don't appear in search results even wh

  • With Relevanssi 2.9.11, I have Respect exclude_from_search for custom post types checked and What to include in the index: All public post types selected. I save and re-index, but my public custom post types don’t appear in the results.

    They do appear if I switch to What to include in the index: Everything.

    I dumped the custom post types to double check — they have public: true and exclude_from_search: false.

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

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

    @msaari

    Hmm, it should work… When set to “All public post types”, Relevanssi fetches all post types that have ‘exclude_from_search’ set to false or 0.

    Please check your database. It’s possible the posts are being indexed, but still not found in search. In order to figure out what’s happening, we need to know which case this is. Take a look at wp_relevanssi and see if any of your custom posts are being indexed (the doc column is the post ID, you can use that to check).

    Hi Mikko,

    Thanks for replying.

    With What to include in the index: All public post types selected, posts from my public custom type don’t appear in the wp_relevanssi table. When I re-index with What to include in the index: Everything, they do appear.

    (Also, when Relevanssi is deactivated, my public types appear in search results as intended.)

    I’ll see if I can debug anything moreā€¦ S

    Hi Mikko,

    Around line 2006 in relevanssi_build_index(),

    $custom_types = ""

    is overwriting the value set earlier (around line 1988) when the public types are fetched.

    Here is a diff: http://pastie.org/2827788

    Plugin Author Mikko Saari

    @msaari

    Thanks for spotting this. Will fix this in the next version.

    As a quick fix, the custom post type stuff is completely reworked in Relevanssi Premium and does not have this bug.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Relevanssi – A Better Search] Public post types don't appear in search results even wh’ is closed to new replies.