Woocommerce Orders with Weaviate

  • sannin
    Participant
    11 months, 2 weeks ago #33183

    Hello,

    I have configured wpsolr to index all woocommerce orders and i have selected some custom fields. I also have created a view just for orders.

    The goal to search for a telephone and get the order with that telephone. Or search for a product and get the orders which contain that product.

    I am using weaviate with clip vectorizer and i have tested with various settings but the results are irrelevant!

    Can you tell me how i could come close to my goal?

    wpsolr
    Keymaster
    11 months, 2 weeks ago #33185

    Perhaps using the Weaviate’s hybrid mode in your wiew could be better?

    Or create another index for your orders view?

    A client was using Elasticsearch for orders and front-end search, and decided to go for Weaviate with Cohere for the front-end search. While keeping Elasticsearch on the backend.

    sannin
    Participant
    11 months, 2 weeks ago #33198

    I tried hybrid mode but the results were not good. I took your advice for a separate index for orders, i used elasticsearch, because i prefer when i search for an email or telephone to get exact matches, so vector search might not be ideal. So far, it works as intended!

    To my understanding, wp-solr indexes order’s custom fields. Does it index the line items of the order? I would like to search for an SKU and find the orders that contain it.

    wpsolr
    Keymaster
    11 months, 2 weeks ago #33199

    Does it index the line items of the order? I would like to search for an SKU and find the orders that contain it.

    Order lines are not stored as custom fields, hence cannot be indexed/searched: https://github.com/woocommerce/woocommerce/wiki/Database-Description#table-woocommerce_order_items

    If you’re looking for order line skus, you can fill a custom field with the skus of the current order just before indexing.

    We already do that for order’s product titles if you select “wpsolr_order_line_product_title” in screen 2.2
    You can use hook WPSOLR_Events::WPSOLR_FILTER_POST_CUSTOM_FIELDS to do that, as seen in file /plugins/wpsolr-pro/wpsolr-pro/wpsolr/pro/extensions/woocommerce/class-wpsolr-plugin-woocommerce.php

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.