• Resolved kevrwill

    (@kevrwill)


    Hi, we are trying to get the Custom fields search indexing to work for us here. In our woocommerce product, there is a custom meta field that contains text that we want to index but have not been successful in getting this in the search results.

    Relevanssi Settings:
    Indexing: Custom fields: Some (_sku, _leather_environmental)
    Excerpts and highlights: Use custom fields for excerpts: ?(Yes)Use custom field content for building excerpts

    I put the unique text HrAL7Q in the custom field to try to isolate the search results. This custom field is stored in the postmeta table, meta_key: leather_environmental You would see this custom text on the product page underneath the image.

    Link to product page containing desired search result:
    https://cortinaleathers.gomedia.cc/leathers/monterrey/

    search string that should return our product:
    https://cortinaleathers.gomedia.cc/?s=HrAL7Q

    I can provide further information as needed. We could upgrade the plugin but we would need to justify this to our client and we’d like to find out what we are doing wrong with our free plugin implementation. Thanks for your great work!

    The page I need help with: [log in to see the link]

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

    (@msaari)

    First, check that the post is indexed correctly. Enter the post ID in the Relevanssi debugger at Settings > Relevanssi > Debugging. Does “HrAL7Q” show up in the debugger under custom field content? If not, check that the custom field name is correct.

    Your search is not responding to Relevanssi parameters. https://cortinaleathers.gomedia.cc/?s=paraffin&post_types=page and https://cortinaleathers.gomedia.cc/?s=paraffin&post_types=post should return different results, but return the same results. Are you sure your search is using Relevanssi? If you search for “HrAL7Q” in the Relevanssi admin search (Dashboard > Admin search), does that work?

    Thread Starter kevrwill

    (@kevrwill)

    HrAL7Q appears in the debugger, yes. Admin search returns the Monterrey product result.
    “Your search is not responding to Relevanssi parameters.” We’ll investigate this issue tomorrow. Thank you for your insights!

    @msaari based on your experience, what are the common plugins, functions or settings that would cause an activated Relevanssi to not provide the search results?

    Thanks for all you do!

    • This reply was modified 1 year, 6 months ago by wilrevehl.
    Plugin Author Mikko Saari

    (@msaari)

    Most of the time (95 % of cases), it’s a search results template that performs an extra WP_Query instead of the default query.

    That’s very insightful, thanks! We’ll look for anything messing with the main query.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Unable to get search results for Custom fields’ is closed to new replies.