By paweloque

2018-01-24 15:02:37 8 Comments

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 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="">

Connection Errors

To implement this example I followed the ReactiveSearch Quickstart


@Divyanshu Maithani 2018-02-08 19:14:18

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

    <Component1 .. />
    <Component2 .. />

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.


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

@Laura 2019-02-25 03:18:41

Can you please help me to connect to my Elasticsearch AWS cluster @Divyanshu ? I dont find so much information or examples about it... In my ReactiveBase I have add the app='my-index' and in the url I put the cluster url, but I cant get the information of the indexed documents and I dont have errors in the console.

@Divyanshu Maithani 2019-02-25 09:24:00

Hi, last I remember, the connection should work with just the app and url prop. Could you please share a codesandbox example if you want me to take a look or perhaps someone in the gitter channel

@Laura 2019-03-17 23:48:37

Hi @Divyanshu , Thanks! This is my codesanbox

@Divyanshu Maithani 2019-03-18 06:13:46

Hey @Laura the app is working fine. Just remove the autosuggest={false} prop in DataSearch and you should be able to see the suggestions.

@Laura 2019-03-18 23:09:28

Oh...thanks so much @Divyanshu ! Just another question please! Do you know why this is not working? ? It works fine if I delete ResultCard component

@Divyanshu Maithani 2019-03-19 05:07:55

Seems like you're using a newer version which has a different API. For example the onData prop has been removed it seems. Could you please check from the docs? I'm not aware of the new API either.

@Laura 2019-03-23 20:09:56

I have seen this, which was published 5 days ago: But I Dont know how to change my package.json to achieve this goal :

@Divyanshu Maithani 2019-03-24 14:51:01

You can just change the dependency version in package.json

@Laura 2019-03-30 02:15:03

It works, @Divyanshu. Thanks! Can you please take a last view to my code? I have added a Reactivemaps component but it does not work. Im sorry for all these questions...

Related Questions

Sponsored Content

11 Answered Questions

[SOLVED] Make elasticsearch only return certain fields?

  • 2012-03-07 16:24:08
  • user1199438
  • 292322 View
  • 442 Score
  • 11 Answer
  • Tags:   elasticsearch

19 Answered Questions

[SOLVED] Removing Data From ElasticSearch

  • 2014-04-07 22:31:42
  • user687554
  • 556662 View
  • 368 Score
  • 19 Answer
  • Tags:   elasticsearch

10 Answered Questions

[SOLVED] Shards and replicas in Elasticsearch

29 Answered Questions

[SOLVED] Elasticsearch query to return all records

1 Answered Questions

Can I use ReactiveSearch components without ElasticSearch?

1 Answered Questions

[SOLVED] Elasticsearch treat nested json as plain string: can't get text on a start_object

1 Answered Questions

[SOLVED] Elasticsearch CORS error with ReactiveSearch

2 Answered Questions

[SOLVED] Elasticsearch as Image Server vs Apache

Sponsored Content