• sophie2e

    (@sophie2e)


    Hello Mikko,

    Hope you’re well. I need your help to set up Relevanssi correctly. I tried to add custom taxonomies and product categories to the search but for some reason, I do not see the right amount of products related to the search. It seems that looking into the Custom Taxonomies is not working properly, instead, the search still uses the default WordPress search function by only checking the title and description.

    I am not a very technical person, so I shot a video showing you the issue and my settings in detail, as well as the test made with Query Monitor following your support guidelines: https://share.vidyard.com/watch/sftH1mHttxZmseefUUEgQN?

    Can you please let me know if you need anything else to understand what is going wrong with my settings?

    Thanks a lot for your help and time,
    Kind regards,
    Sophie

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

    (@msaari)

    Your video doesn’t have a transcription, so unfortunately, it doesn’t help me much (I read video transcripts, but I don’t watch videos).

    It’s quite possible the search is not using Relevanssi. What would be the correct number of results for “fabric coupons”? The search shows “3 results”, but also “no products found”. Where’s the search filter coming from? Is it Elementor or a plugin?

    If you try searching with the Relevanssi admin search (Dashboard > Admin search), does that get you the correct results? If it does, Relevanssi is set up correctly; the problem is how your front-end search is built. If it doesn’t, then the problem is in the Relevanssi setup. Your indexing settings are correct.

    Thread Starter sophie2e

    (@sophie2e)

    Hello Mikko,

    Thanks for your reply and help. It is a bit difficult to explain without showing you but no worries, I will try 🙂

    Here is the transcript/explanations of the video:

    The issue is about my search page and to give you a quick overview, I am using Elementor Template to manage this search results page (which is an Elementor Search Results Template). It is built with a product list widget and filters made with Facet WP (note that I have the plugin which makes Relevanssi and Facet WP compatible).

    The issue I am facing is that, for instance, if I look for the keyword “fabric coupon” in the Elementor Search Form, which is a product category coming from Woocommerce, I have 0 results shown in the product list while there are 3 products in this product category Fabric Coupon. And indeed, if I go on my shop page and I select the product category “Fabric Coupon” via the Facet WP filter for Product Category, I do see the 3 products in the product list, which are in this category Fabric Coupon. And it is the same if I go on the Product Category Archive page “Fabric Coupon”, I also see these 3 products in the product list.
    But again, on the search result page, I do not see any products.
    So this is an example of the product category taxonomy coming from Woocommerce.

    Then there is the custom taxonomies coming from ACF plugin. I am also facing the same issue as the product category when I look for a term that is coming from a custom taxonomy, created with ACF.
    So I have a custom taxonomy called Certification, and I have a filter created with FacetWP associated with this custom taxonomy Certification. But for some reason, if I am looking for a keyword which is a term in this custom taxonomy, I will not see the products that are associated with this certification. For instance, if I look for the keyword Gots, which is a term in the custom taxonomy certification, I can only see 1 product on the search results template while they are 3 products associated with the Gots certification. I see one product because the term Gots is used in its description.
    And here too, if I check my shop page and I select the term “Gots” via the Facet WP filter for the Certification Taxonomy, I do see the 3 products in the product list, which are in this child taxonomy Gots. And it is the same if I go on the Product Certification Archive page “Gots”, I also see these 3 products in the product list.

    So it seems that for now it still works with the default WordPress search function.

    Then if I try to follow the 2 steps you provide in your support guideline documentation, I set up Query Monitor but I am not a very technical person so not sure if I understand correctly.
    Once I make a search for “Fabric Coupons” in the Elementor Search form, I got redirected to the Elementor Search Results Template, where I do not see any products in the product list.
    Then I checked the Database Queries with Query Monitor, then I searched for relevanssi_search in the Caller field, and I am seeing this:

    SELECT DISTINCT(relevanssi.doc), relevanssi.*, relevanssi.title * 5 + relevanssi.content * 1 + relevanssi.comment * 0.75 + relevanssi.tag * 1 + relevanssi.link * 0 + relevanssi.author + relevanssi.category * 1 + relevanssi.excerpt + relevanssi.taxonomy + relevanssi.customfield + relevanssi.mysqlcolumn AS tf
    FROM adv_relevanssi AS relevanssi
    WHERE (relevanssi.term LIKE ‘fabric%’
    OR relevanssi.term_reverse LIKE CONCAT(REVERSE(‘fabric’), ‘%’))
    ORDER BY tf DESC
    LIMIT 500+

    SELECT DISTINCT(relevanssi.doc), relevanssi.*, relevanssi.title * 5 + relevanssi.content * 1 + relevanssi.comment * 0.75 + relevanssi.tag * 1 + relevanssi.link * 0 + relevanssi.author + relevanssi.category * 1 + relevanssi.excerpt + relevanssi.taxonomy + relevanssi.customfield + relevanssi.mysqlcolumn AS tf
    FROM adv_relevanssi AS relevanssi
    WHERE (relevanssi.term LIKE ‘coupons%’
    OR relevanssi.term_reverse LIKE CONCAT(REVERSE(‘coupons’), ‘%’))
    ORDER BY tf DESC
    LIMIT 500+

    And I notice that here “relevanssi.link * 0 + relevanssi.author + relevanssi.excerpt + relevanssi.taxonomy + relevanssi.customfield” I have some 0 value for the weight, and some are missing; while I read in one of your doc that we should not have 0. Unfortunately, when I am going to Relevanssi Search Options, and then check the Weight field, I do not have any option for the taxonomy or custom field nor for relevanssi.link + relevanssi.author + relevanssi.excerpt so I cannot add weight to them. I am not sure if it can be the cause of the issue? And if it is, where can I add these missing/zero weight values?

    And then concerning MySQL, I am not so sure exactly where to find this info with MySQL, but I remember seeing something about wp query->get_posts, and if I select this caller field, and then I check the info in the Query, I see lots of information but I cannot say anything about it as I do not understand them.

    And then In Relevanssi Search Options settings, in Searching, in Default operator, I added the “Or – ay term parent is enough”, for default order, I added relvance (highly recommended), for keyword matching I selected Partial words as it is recommended in the interface. Then I have the default weight set up by the plugins. The only terms I can see are Content, Titles, Comment text, tag weight, and category weight.
    I also have the boost exact matches option activated. I deselected the Respect exclude_from_searches options as I was seeing a notice telling me I should probably uncheck this option because I set relevanssi to index the following non-public types: acf-taxomomy, act-post-type, product_variation.

    For the Excerpts and highlight settings, I have enabled create custom search results snippets options and use custom field content for building excerpts, all the other options are unchecked.

    Now in the Index settings: I have only enabled:
    -in post type: acf=taxonomy, acf-post-type, product, product_variation,
    – in taxonomies: all the custom taxonomies created with ACF, and the product_cat, product_tag, pa_color, pa_materials, pa_size from woocommerce.
    – for custom fields: I selected Visible as advised in the documentation
    – Author display and Excerpts are enabled.
    Expand shortcode is disabled as there is a notice explaining it should not be use with Woocommerce.

    So this is my settings and the explanations of the video.

    Then in Dashboard, I do not have any search, but I check in the search form of the Products page in the admin, and it also still uses the default WordPress search, meaning only showing products with the terms in the title or the description.

    Waiting for your news,
    Let me know if you have other questions,
    Looking forward to hearing from you,
    Kind regards
    Sophie

    Plugin Author Mikko Saari

    (@msaari)

    Do you get the correct results from the Relevanssi admin search (Dashboard > Admin search)?

    Thread Starter sophie2e

    (@sophie2e)

    Hello Mikko,

    Sorry did not get where you wanted me to check, but found it out. So indeed there I have the right results.

    The front-end search is built with the Elementor Search Form in the menu header, and with the Facets WP search filters on the Elementor Search Results template. I also have the plugin which makes Relevanssi compatible with Facet WP, and I read on the Elementor Search Form doc that your plugin was also compatible with them.

    I made a test by adding the default Elementor Products widget on the Elementor Search Results template, but again the results are not correct. When I look for the keywords Gots or Fabric Coupons in the Elementor Search Form, I got all the products listed on the website shown on the Search Results template.

    Could you help me figure out why?

    Thanks a lot for your help and time,
    Kind regards,
    Sophie

    Plugin Author Mikko Saari

    (@msaari)

    Ok, so Relevanssi is working correctly and returns the expected results. You have set up Relevanssi right, and you don’t have to worry about that.

    Unfortunately, the combination of Elementor and FacetWP has too many unknown features for me. I can’t help you with that. Without Elementor involved, I could help you – I know little of how FacetWP works with Relevanssi. However, all those Elementor features are a complete black box for me. It looks like some part of the search is probably using Relevanssi – the part that shows how many posts are found, for example – but the main result loop is using the default WP search.

    As I don’t have any access to the components of the search, I have no idea what happens inside them, and I can’t help you figure out how to solve it. I can’t even tell if it’s possible to solve this; it’s possible that the Elementor product search widgets are built in a way that is fundamentally incompatible with Relevanssi.

    Thread Starter sophie2e

    (@sophie2e)

    Hello Mikko,

    Thanks for your feedback. In this case, I will try to get in touch with Elementor as they advised me about your plugin and have an article on their website about your plugin.

    Hopefully, they can figure it out and let me know if it is possible or not.

    Thanks for your time,
    Kind regards,
    Sophie

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom Taxonomies Search Issue’ is closed to new replies.