简体   繁体   English

将ReactiveSearch与普通弹性搜索结合使用

[英]Using ReactiveSearch with plain elasticsearch

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. 虽然示例和文档描述了这应该是可能的: ReactiveBase ,请参阅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. 我收到连接错误和Websocket调用wss://..看起来ReactiveBase试图连接到appbase.io托管弹性。 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定义:

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

连接错误

To implement this example I followed the ReactiveSearch Quickstart 为了实现这个例子,我遵循了ReactiveSearch Quickstart

Yes, it's possible to connect to a normal Elasticsearch cluster (docs) with reactivesearch. 是的,可以使用reactivesearch连接到正常的Elasticsearch集群(docs) 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. app prop引用索引名称。 Looks like you're using this with AWS. 看起来您正在使用AWS。 Since AWS doesn't allow you to configure ES settings, you might need to use a middleware proxy server. 由于AWS不允许您配置ES设置,因此您可能需要使用中间件代理服务器。 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. 如果您在AWS上使用Elasticsearch,则建议的方法是通过中间件代理进行连接,因为它们不允许设置Elasticsearch配置。

The docs also explain how you can write your own proxy server. 文档还解释了如何编写自己的代理服务器。

TLDR: TLDR:

The connection error related to websockets you see here isn't causing the issue. 您在此处看到的与websockets相关的连接错误不会导致问题。 It's used for streaming which works on appbase.io. 它用于在appbase.io上运行的流媒体。 This has been fixed in the 2.2.0 release. 这已在2.2.0版本中修复。 Hope this helps :) 希望这可以帮助 :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM