enjalot / blockbuilder-search-index

download and process d3.js blocks for further indexing and visualization
BSD 3-Clause "New" or "Revised" License
24 stars 5 forks source link

setup gcp hosted search #53

Open micahstubbs opened 6 years ago

micahstubbs commented 6 years ago

setup gcp (google cloud platform) hosted search

💭 reasoning

1) gcp with dev credits is likely lower-cost than our existing elastic cloud search index instance. 2) support for the old version of Elasticsearch we currently run (2.4.x something) is going away on 8/28, so we have to re-write our search queries in our blockbuilder search frontend code soon anyway 3) since we have to re-write search queries anyway, might as well migrate to a lower cost provider while we are at it

📑 tasks

micahstubbs commented 6 years ago

@enjalot curious, is this the App Engine Searchable Document Indexes service that you had in mind? https://cloud.google.com/appengine/docs/standard/java/search/?hl=en_GB&_ga=2.194014253.-1243297456.1534856335

micahstubbs commented 6 years ago

there's also this Cloud Search product, but it seems targeted at big enterprises rather than developers 🤔 https://cloud.google.com/products/search/

micahstubbs commented 6 years ago

so there is also Google Cloud Datastore, but that looks like a document store rather than a search engine https://db-engines.com/en/system/Elasticsearch%3BGoogle+Cloud+Datastore

micahstubbs commented 6 years ago

this list looks helpful

https://db-engines.com/en/ranking/search+engine

screen shot 2018-08-21 at 6 32 57 am

ah, but this Google Search Appliance https://enterprise.google.com/search/products/gsa.html is just the earlier version of the enterprise-y Google Cloud Search we found earlier. hhhmmm.

micahstubbs commented 6 years ago

ok, it looks like this is the one App Engine Searchable Document Indexes https://cloud.google.com/appengine/docs/standard/python/search/

micahstubbs commented 6 years ago

here are some code examples for using the search API from a Python client https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/appengine/standard/search/snippets/snippets.py

micahstubbs commented 6 years ago

I did some research.

I want a Node.js client for the AppEngine Searchable Document Indexes, which today only has clients in Python 2.7, Java, and Golang. I'm thinking if I can find the source code for one of the existing SDKs, perhaps I can translate it into JavaScript 💡

let's search for the google.appengine.api python package mentioned on this line from google.appengine.api import search in one of the official SDK example code snippets https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/appengine/standard/search/snippets/snippets.py

screen shot 2018-08-23 at 12 57 56 am

prior work

micahstubbs commented 6 years ago

ok, posted in the gcp community slack to see if they know about this search module screen shot 2018-08-23 at 1 00 46 am

https://googlecloud-community.slack.com/archives/C0FEPH2SW/p1535011115000100

micahstubbs commented 6 years ago

@enjalot the answer to this question suggests that what's on offer may not really match what we're looking for (provided nothing has changed in the year or two since this answer)

screen shot 2018-08-23 at 1 14 53 am

https://stackoverflow.com/questions/40797735/does-google-cloud-offer-server-less-search-api

micahstubbs commented 6 years ago

got some answers on the gcp slack 😄

think you can find what you're looking for by downloading the original App Engine SDK for Python from here: https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.74.zip (which can be found at the bottom of https://cloud.google.com/appengine/docs/standard/python/download)

Once you download that, the search API is in google_appengine/google/appengine/api/search

screen shot 2018-08-24 at 5 27 03 am

https://googlecloud-community.slack.com/archives/C0FEPH2SW/p1535040913000100

micahstubbs commented 6 years ago

here's the source code for the Python client, that we could perhaps use as a template for writing a nodejs client

https://github.com/micahstubbs/google_appengine/tree/master/google/appengine/api/search

screen shot 2018-08-24 at 5 28 34 am