将ReactiveSearch与普通Elasticsearch结合使用 [英] Using ReactiveSearch with plain elasticsearch

查看:222
本文介绍了将ReactiveSearch与普通Elasticsearch结合使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将Reactsearch与我自己的普通香草elasticsearch集群一起使用。尽管示例和文档描述了这应该可行:



要实现此示例,我遵循了 ReactiveSearch快速入门

解决方案

是的,可以连接到普通的Elasticsearch集群(文档)与reactsearch。看来您使用的是正确的道具。示例代码:

 < ReactiveBase 
app = your-elasticsearch-index
url = http:// your-elasticsearch-cluster
>
< Component1 .. />
< Component2 .. />
< / ReactiveBase>

app 引用索引名称。看来您是在AWS上使用它。由于AWS不允许您配置ES设置,因此您可能需要使用中间件代理服务器。从 docs


如果您在AWS上使用Elasticsearch,则建议的方法
是通过中间件代理进行连接,因为它们不允许设置
Elasticsearch配置。


文档还介绍了如何编写自己的代理服务器。



TLDR:





您在此处看到的与Websocket相关的连接错误不是导致此问题的原因。它用于在appbase.io上运行的流式传输。 2.2.0 版本已修复此问题。希望这会有所帮助:)


I'd like to use reactivesearch with my own plain vanilla elasticsearch cluster. While the example and documentation describe that this should be possible: ReactiveBase, see the url Param. I get connection errors and a Websocket call wss://.. which looks like ReactiveBase is trying to connect to a appbase.io hosted elastic instead. It also passes a credentials code along with the call to elastic which is not specified in my code.

Is it possible to connect to a normal elastic and where can I find the documentation on how to do this?

This is my definition of ReactiveBase:

<ReactiveBase app="documents"url="https://search-siroop-3jjelqkbvwhzqzsolxt5ujxdxm.eu-central-1.es.amazonaws.com/">

To implement this example I followed the ReactiveSearch Quickstart

解决方案

Yes, it's possible to connect to a normal Elasticsearch cluster (docs) with reactivesearch. It seems you're using the correct props. Sample code:

<ReactiveBase
  app="your-elasticsearch-index"
  url="http://your-elasticsearch-cluster"
>
    <Component1 .. />
    <Component2 .. />
</ReactiveBase>

The app prop refers to the index name. Looks like you're using this with AWS. Since AWS doesn't allow you to configure ES settings, you might need to use a middleware proxy server. From the docs:

If you are using Elasticsearch on AWS, then the recommended approach is to connect via the middleware proxy as they don’t allow setting the Elasticsearch configurations.

The docs also explain how you can write your own proxy server.

TLDR:

The connection error related to websockets you see here isn't causing the issue. It's used for streaming which works on appbase.io. This has been fixed in the 2.2.0 release. Hope this helps :)

这篇关于将ReactiveSearch与普通Elasticsearch结合使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆