#community-help

Modifying Search Query in Wordpress Plugin with Typesense API

TLDR Noorhalim needs help modifying search query in WordPress plugin. Digamber explains that instant search js is used, but queries can't be intercepted before reaching Typesense servers.

Powered by Struct AI

1

1

14
7mo
Solved
Join the chat
Feb 21, 2023 (7 months ago)
Noorhalim
Photo of md5-e913a3ee39d339415ebf1791c50a6bc4
Noorhalim
07:43 AM
Need help with the wordpress plugin. From the wordpress plugin, is anyone familar with modifying search query before calling the typesense API?

1

Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
11:14 AM
Digamber cc
Digamber
Photo of md5-a0246423746b3b51425d05cfd9c494ae
Digamber
11:16 AM
Noorhalim if you’re referring to the frontend, then we use instant search js or an implementation of instant search js.

https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/

As of this moment there isn’t a way to intercept the queries before it hits typesense servers

1

Noorhalim
Photo of md5-e913a3ee39d339415ebf1791c50a6bc4
Noorhalim
02:56 PM
Thank you Digamber for the information.
Feb 22, 2023 (7 months ago)
Noorhalim
Photo of md5-e913a3ee39d339415ebf1791c50a6bc4
Noorhalim
08:12 AM
Digamber From the code in the plugin, it seems like instantsearch gets the parameter set in this file.
Image 1 for <@4L835> From the code in the plugin, it seems like instantsearch gets the parameter set in this file.
08:12
Noorhalim
08:12 AM
what is the json or query that is being sent to Typesense from the instantsearch when the page load on wordpress?
Digamber
Photo of md5-a0246423746b3b51425d05cfd9c494ae
Digamber
08:18 AM
That filter is for the initial query sent to typesense
08:18
Digamber
08:18 AM
the Instantsearch library handles the requests
Noorhalim
Photo of md5-e913a3ee39d339415ebf1791c50a6bc4
Noorhalim
08:35 AM
i see, thank you
08:35
Noorhalim
08:35 AM
i saw the instantsearch js
08:35
Noorhalim
08:35 AM
Image 1 for
08:36
Noorhalim
08:36 AM
are we able to get the uncompressed version?
08:47
Noorhalim
08:47 AM
Digamber I currently need to edit the search query, before passing to the typesense. Do you have any advice on how i can do this? - given the situation that the instantsearch library handles the request.
Digamber
Photo of md5-a0246423746b3b51425d05cfd9c494ae
Digamber
08:49 AM
Hi Noorhalim, i can’t provide the uncompressed version for the plugin right now.

we keep a list of current instancs in window.swtInstance