Mrtenz / gatsby-plugin-aws-elasticsearch

A plugin for Gatsby to synchronise content between Gatsby and AWS Elasticsearch
MIT License
3 stars 1 forks source link

Could this theoretically support Elasticsearch outside AWS? #8

Open tony opened 3 years ago

tony commented 3 years ago

Could this support a local elasticsearch installed on a distro? Elasticsearch hosted on another platform?

Mrtenz commented 3 years ago

With how it's designed currently, it won't work outside of AWS. It's specifically designed to send HTTP requests in the format that AWS expects (including the signature etc.). I'm not familiar with ElasticSearch outside of AWS, so I'm not sure if it would be easy to support that.

tony commented 3 years ago

I'm new to elasticsearch in either case - but will check this library out more to see if I can get it to work with local ES or not

Do you want to close this or keep it open to see if there's interest? This seems to be the only elasticsearch "push" plugin available in all gatsby AFAIK

Mrtenz commented 3 years ago

I'll keep it open for now, let me know if you have any questions!

This seems to be the only elasticsearch "push" plugin available in all gatsby AFAIK

There's also gatsby-plugin-elasticsearch, but I don't know if that's used to push content into ES, or to fetch content from ES.

tony commented 3 years ago

As far as the state of elasticsearch on Gatsby, their don't seem to be any active projects to push documents to elasticsearch, like gatsby-plugin-{algolia,local}-search.

If you click https://www.gatsbyjs.com/plugins/gatsby-plugin-elasticsearch/ and click View Plugins on GitHub, the original authors deleted their GitHub projects

It now forwards to https://github.com/search?q=gatsby-plugin-elasticsearch, which mentions gatsby-source-elasticsearch, which is a different type of plugin

tony commented 3 years ago

I'll keep it open for now, let me know if you have any questions!

Absolutely! I'm new to elasticsearch still

tony commented 3 years ago

@Mrtenz

  1. I got this plugin working outside of aws just by making the secretAccessToken and accessKeyId optional in the struct
  2. I have a fork of the repo at https://github.com/tony/gatsby-plugin-elasticsearch-search
    • Uses ES + commonjs: No need for a compilation phase, this makes general maintenance and development far faster. Gatsby doesn't support TypeScript natively for plugins. Maybe https://github.com/gatsbyjs/gatsby/discussions/31587 will change this
    • moving over to elasticsearch-js
    • elastic.co support

Any of the code in here of interest? https://github.com/tony/gatsby-plugin-elasticsearch-search

I avoided taking the NPM package name for gatsby-plugin-elasticsearch-search since I don't have the time to maintain the project (so hoping someone finds the changes helpful)