We have a query regarding hosting Typsense in Goog...
# community-help
s
We have a query regarding hosting Typsense in Google Cloud. Website itself is hosted on the cloud. Indexing works with localhost as url. But searching from website does not work. For more details, please see here: https://wordpress.org/support/topic/on-google-cloud/ It would be better if anyone can chime on that thread. Thanks in advance.
k
Does the Google Cloud instance have a publicly reachable IP?
s
I will have to ask the thread starter. Can your respond in the thread there? Or let me know what other details do you need and I will ask them.
k
Please ask the thread starter to post here on this thread so it will be easier to answer.
s
Okay will ask him to do that.
a
Hello. I am the thread starter. Yes, instance has a static ip.
k
Can you post your config file (just remove the API key)? What error are you getting?
a
; Typesense Configuration [server] api-address = 0.0.0.0 api-port = 8108 data-dir = /var/lib/typesense api-key = xxx log-dir = /var/log/typesense
k
And what happens when you access http://x.y.z:8108/health ? (Replace x.y.z with your static IP)
a
If I set the node URI as localhost, indexing is successful. But searching not working. If I set ip address in node URI, indexing is failing.
The web page is not opening. It says: This site can’t be reached
k
Have you checked your firewall rules to ensure that the port 8108 is accessible outside?
a
No. Let me find out how to do.
I made the rule. Now the page is working and it says: {"ok":true}
k
Cool you should now be able to both index and search
a
Enter Node URI: the static ip protocol: http port: 8081 key: the key in the .ini file But I got an error: Something Has gone wrong while bulk importing
Should I change the Node URI to localhost?
k
8108 right not 8081
Node uri should be static IP
Post the client configuration also?
Also increase client timeout because imports can take a long time. Default time-out might be too small.
a
Oh. I set 8108 and now it is working.
Thank you for your help.
k
Welcome!
a
Is there any way to add synonyms on self-host? I can do that on a cluster for my woocommerce products. I can even add documents and delete them. http://x.y.z:8108/ says: { "message": "Not Found"}
k
Yeah you can add. There is no difference between Typesense Cloud and OSS version.
a
Where I can reach the typesense-server?
k
Same way as the other end-points.
a
I have no idea 🙂
k
You should be able to follow the docs here: https://typesense.org/docs/0.23.1/api/synonyms.html They have examples.
a
Thank you. So I can add and delete them only on SSH. No http access from the browser like Typesense Cloud, right?
k
Yes, maybe I misread your question yesterday. The UI is available only on Typesense Cloud. You have to use the client / curl for updating synonyms on the self hosted environment.
👍 1