• Resolved sannin

    (@sannin)


    Typesense has many features that are not implement yet.

    The most important features in my use cases are:

    – query_by_weights
    – sort_by

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter sannin

    (@sannin)

    Hello,

    Do you have any update on that? It would be great to have some more control on how typesense behaves. For example in a woocommerce shop:

    – query_by_weights:

    Fields that contain SKU or EAN information should have a greater weight than the rest of them.

    – sort_by:

    I could affect the result ordering maybe by sales or pageviews, and only by “_text_match:desc” that is by default.

    – prioritize_exact_match:

    The default value of true works for me but it would be nice to have control.

    – num_typos

    In certain fields like SKU and MPN it is unacceptable to have typo tolerance.

    Isn’t it possible to have a filter hook that gives access to all typesense parameters?

    Plugin Author CodeManas

    (@codemanas)

    Hello @sannin ,

    Thank you for your patience. We were working on adding this feature.

    In the premium plugin Typesense Search for WooCommerce, we have added a new hook cm_tsfwc_additional_search_params which you can use to pass extra parameters like this:

    add_filter( 'cm_tsfwc_additional_search_params', 'theme_slug_alter_search_params' );
    function theme_slug_alter_search_params() {
    	return [
    		'hidden_hits' => 3662,
    		'query_by_weights' => '1,2', 
    		'query_by' => "post_content,post_title",
    		'sort_by' => 'total_sales:asc', // work only with numerical fields
    		'filter_by' => 'post_title: test',
    		'facet_by' => 'category,prices', // can not override so dont work
    		'max_facet_values' => 1, // can not override so don't work
    		'facet_query' => 'category_lvl0: Alaram',
    		'num_typos' => 2,
    		'page' => 2, // cannot override so don't work
    		'group_by' => 'category',
    		'highlightFullFields' => 'post_title,post_content,test',
    		'include_fields' => 'price,prices',
    		'pinned_hits' => '3662:2',
    	];
    }

    Please note some parameters like facet_by, q, max_facet_values, page can not be overwritten. Others can be passed as required. Please test it out and provide us your feedback.

    We will provide this feature in free version soon in the next update.

    Please post the issues/feature request regarding the Typesense for WooCommerce, in the CodeManas’ forum here: https://forum.codemanas.com/forums/c/typesense-search-for-woocommerce/

    Regards,
    CodeManas

    • This reply was modified 3 years, 10 months ago by CodeManas.
    • This reply was modified 3 years, 10 months ago by CodeManas.
    Thread Starter sannin

    (@sannin)

    Nice, i already have the addon, but i thought that i would be done in the core plugin first because the code would be common.

    That works only for instant search and not for autocomplete right?

    Plugin Author CodeManas

    (@codemanas)

    Yes, it works only for instant search and not for autocomplete.

    Plugin Author CodeManas

    (@codemanas)

    Hi @sannin ,

    It’s been a while since the last response to this message.
    I’m assuming the issue is now resolved and closing this ticket.
    If not please re-open this ticket.

    Regards,
    Codemanas

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Typesense features implementation’ is closed to new replies.