Unfamiliar with Google Cloud Platform Elasticsearch setup. Few questions


(Christopher Jones72521) #1

Hello Elasticsearch community,

I've recently setup an Elasticsearch http-server on Google Cloud Platform for the purpose of using it for autocompletion. There are just a few things I can't figure out.

  • External Access: I enabled HTTP requests on the instance and still, the external IP:9200 times out. The yml says Elasticsearch, by default, binds itself to the 0.0.0.0 address. But, I'm wondering if there is something I'm missing.

  • CORS: I've been through every the deepest depths of the internet searching for a way to set my Access-Control-Allow-Origin in the header.

from my elasticsearch.yml:

Set a custom port to listen for HTTP traffic:

http.port: 9200

User added values to allow Cross-Origin Resource Sharing

http.cors.enabled : true
http.cors.allow-origin : /https?://localhost(:[0-9]+)?/

If anyone is willing to take a look. I'm having issues with a python script I wrote to insert records into the datastore.

And,
I'm having an issue limiting my search query results. I'm able to return results. But, I'm not grasping the proper way to go about limiting them. I've been reading documentation for days now and my head is sort of spinning. Any help is greatly appreciated.

-Chris


(system) #2