将 ReactiveSearch 与普通的 elasticsearch 结合使用
Using ReactiveSearch with plain elasticsearch
我想在我自己的普通 vanilla elasticsearch 集群中使用 reactivesearch。虽然示例和文档描述这应该是可能的:ReactiveBase,请参阅 url
参数。我收到连接错误,Websocket 调用 wss://..
看起来 ReactiveBase
正在尝试连接到 appbase.io
托管弹性。它还将凭据代码与我的代码中未指定的弹性调用一起传递。
是否可以连接到普通弹性体,我在哪里可以找到有关如何执行此操作的文档?
这是我对ReactiveBase
的定义:
<ReactiveBase app="documents"url="https://search-siroop-3jjelqkbvwhzqzsolxt5ujxdxm.eu-central-1.es.amazonaws.com/">
为了实现这个例子,我遵循了 ReactiveSearch Quickstart
是的,可以使用 reactivesearch 连接到普通的 Elasticsearch 集群 (docs)。看来您使用的是正确的道具。示例代码:
<ReactiveBase
app="your-elasticsearch-index"
url="http://your-elasticsearch-cluster"
>
<Component1 .. />
<Component2 .. />
</ReactiveBase>
app
属性指的是索引名称。看起来您正在将其与 AWS 一起使用。由于 AWS 不允许您配置 ES 设置,您可能需要使用中间件代理服务器。来自 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.
文档还解释了如何编写自己的代理服务器。
TLDR:
- Proxy server
- 使用 client app 中的代理服务器和 reactivesearch
您在此处看到的与 websockets 相关的连接错误不是导致问题的原因。它用于在 appbase.io 上运行的流式传输。这已在 2.2.0
版本中修复。希望这会有所帮助:)
我想在我自己的普通 vanilla elasticsearch 集群中使用 reactivesearch。虽然示例和文档描述这应该是可能的:ReactiveBase,请参阅 url
参数。我收到连接错误,Websocket 调用 wss://..
看起来 ReactiveBase
正在尝试连接到 appbase.io
托管弹性。它还将凭据代码与我的代码中未指定的弹性调用一起传递。
是否可以连接到普通弹性体,我在哪里可以找到有关如何执行此操作的文档?
这是我对ReactiveBase
的定义:
<ReactiveBase app="documents"url="https://search-siroop-3jjelqkbvwhzqzsolxt5ujxdxm.eu-central-1.es.amazonaws.com/">
为了实现这个例子,我遵循了 ReactiveSearch Quickstart
是的,可以使用 reactivesearch 连接到普通的 Elasticsearch 集群 (docs)。看来您使用的是正确的道具。示例代码:
<ReactiveBase
app="your-elasticsearch-index"
url="http://your-elasticsearch-cluster"
>
<Component1 .. />
<Component2 .. />
</ReactiveBase>
app
属性指的是索引名称。看起来您正在将其与 AWS 一起使用。由于 AWS 不允许您配置 ES 设置,您可能需要使用中间件代理服务器。来自 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.
文档还解释了如何编写自己的代理服务器。
TLDR:
- Proxy server
- 使用 client app 中的代理服务器和 reactivesearch
您在此处看到的与 websockets 相关的连接错误不是导致问题的原因。它用于在 appbase.io 上运行的流式传输。这已在 2.2.0
版本中修复。希望这会有所帮助:)