Have not been able to find an example from anywhere yet. -Thanks
<ReactiveBase url="http://localhost:9200/" app="app name" type="type name">
So perhaps something else is going on cause I thought it was that simple too.
With this code:
<ReactiveBase app="reactiveapp" url="http://localhost:9200" type="purchases" theme="rbc-blue">
I get the following error:
VM1059:164 WebSocket connection to 'ws://localhost:9200/reactiveapp' failed: Error during WebSocket handshake: Unexpected response code: 404
I have also tried putting my ES index in "app" as well and I get the same error.
ES is running locally:
curl -XGET http://localhost:9200/
{
"name" : "2tnQjI6",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "7kV95RtQRJK5Kpg90z1Y-g",
"version" : {
"number" : "5.6.2",
"build_hash" : "57e20f3",
"build_date" : "2017-09-23T13:16:45.703Z",
"build_snapshot" : false,
"lucene_version" : "6.6.1"
},
"tagline" : "You Know, for Search"
}
@bstaats That error is likely because of the underlying library trying to maintain a realtime subscription, something appbase.io offers but a generic ES cluster wouldn't. It shouldn't have any effect on the functioning of the app.
Yup, I looked at the underlying library and its connecting via a Websocket which ES does not accept. So the below article is misleading then. You are not able to connect reactivesearch components to ES. 😞 🐼
https://medium.appbase.io/reactive-search-v1-ui-components-for-elasticsearch-8d3506b534b2
The websocket connection failure to ES host should have no material effect
on the library's request making with ES or the library's working.
Are you not able to use it?
-Siddharth
On Mon, Oct 23, 2017 at 10:03 PM Brian Staats notifications@github.com
wrote:
Yup, I looked at the underlying library and its connecting via a Websocket
which ES does not accept. So the below article is misleading then. You are
not able to connect reactivesearch components to ES. 😞 🐼https://medium.appbase.io/reactive-search-v1-ui-components-for-elasticsearch-8d3506b534b2
—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
https://github.com/appbaseio/reactivesearch/issues/104#issuecomment-338718309,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAmdGgguf43szwSADFQdGWmzjMJ0EzNVks5svL_lgaJpZM4P_mSg
.>
written in the spirit of three.sentenc.es
I don't know the specifics of your setup @bstaats, but I do have a working website with Reactive-Search pointed at a local version of ES....
I was able to get it to work. The missing piece was setting the correct access control for my local environment. For example:
http.cors.enabled: true
http.cors.allow-credentials: true
http.cors.allow-origin: /https?:\/\/(localhost)?(127.0.0.1)?(:[0-9]+)?/
http.cors.allow-headers: X-Requested-With, X-Auth-Token, Content-Type, Content-Length, Authorization, Access-Control-Allow-Headers, Accept
super helpful @bstaats thank you!
But what about the docs for how to setup your mappings? Obviously the data in your ES index and your mappings must conform to reactivesearch queries so wondering where I can read about how to setup the index & mappings.
The README say you can use "Any Elasticsearch index hosted on any Elasticsearch cluster."
Most helpful comment
I was able to get it to work. The missing piece was setting the correct access control for my local environment. For example: