• Resolved sokien

    (@sokien)


    With my team, we are working on integrating Typesense with WordPress. We have enabled instant search, but there is a need to add additional filters to the search. We have already created the display to provide users with the ability to perform more targeted searches on the front end (e.g., a checkbox that allows you to search by author, search within attachments, or search between an interval of date).

    However, we are unable to detect the code portion in WordPress that needs modification to perform the query with the new options, when users click

    What I would want is to call a function that modifies the ‘query_by’ or parameter based on the values entered by the user in the front end.

    I hope this explanation has been clear, and I would greatly appreciate your assistance.

    Thank you very much

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor digamberpradhan

    (@digamberpradhan)

    Hello @sokien,

    What you’re trying to do is faceted search for these two things need to happen. One is to define the field and data as facets in your typesense schema. Once the fields / data are defined as facets they will be added to the filter panel.

    Please check the documentation then regarding customizing widgets to change how they are displayed.
    https://docs.wptypesense.com/changing-widgets/

    I hope this helps,.

    Thread Starter sokien

    (@sokien)

    Hi @digamberpradhan ,

    thanks for the reply. I am now editing it it helps for some aspects, but I don’t understand if there is a way to edit the inputs to allow the input type date.

    And also, Is there a way to change the filter_by properties, and not only the facets?

    Thank you again

    Plugin Contributor digamberpradhan

    (@digamberpradhan)

    Hi @sokien ,
    You will have to utilize the global instance of swtInstance, which catches all the initialized instant search – instances.
    You can use this to further do more things.

    For example to set a search term clicking a list of tags :
    swtInstance.cm_swt_instant_search_1.helper.setQuery('The').search()

    Will add the “The” as a search term for the instant search which has the class – cm_swt_instant_search_1 hope this helps.

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

The topic ‘Istante Search add other filters than category’ is closed to new replies.