Strongloop Loopback connector for Elasticsearch
An overview on updates in https://github.com/bharathkontham/loopback-connector-elastic-search
I'll update examples and documentation soon.
I'm working only on ElasticSearch 6.x or later support (no intention to work on older versions)
Sample query for nested objects and geo_spatial:
{
"where": {
"and": [
{
"address.geo": {
"geo_shape": {
"address.geo": {
"shape": {
"type": "circle",
"coordinates": [
78.38214860577659,
17.44064909837838
],
"radius": "1km"
},
"relation": "within"
}
}
}
},
{
"entity_properties.value": {
"gt": 50
}
}
]
}
}
entity_properties is a nested object and address is an object.
address.geo has geo_shape data.
Updated example for Elasticsearch 6.x in https://github.com/bharathkontham/loopback-connector-elastic-search
Please check examples/server/datasources.sample-es-6.js
@bharathkontham - would you like to be added as a contributor to the strongloop community repo so that you can own and release 6.x related work more quickly?
Since you will only focus on 6.x and I cannot just nuke the other versions ... We can create a branch for 6.x development and perform 6.x releases from it or I am open to other ideas too.
Let us know.
@bharathkontham - we are hosting a meetup on Elasticsearch and loopback in Pune India. Tentatively it’s planned for sometime between March 2nd and March 14th.
I would like to invite you to attend as a speaker and present and talk about whatever you want on these topics.
The Airfair to fly from Hyderabad to pune and back will be at no cost to you.
Released v 1.0.3 for https://www.npmjs.com/package/loopback-connector-esv6
Fixed "limit" and "include" filter issues when used without "where" filter
"protocol": "https",
"host": "scalr.api.appbase.io",
"port": "443",
"auth": "username:password"
}
Elasticsearch DEBUG: 2018-03-28T06:17:17Z
starting request {
"method": "HEAD",
"castExists": true,
"path": "/catalogdev",
"body": {},
"query": {}
}
Elasticsearch TRACE: 2018-03-28T06:17:19Z
-> HEAD https://scalr.api.appbase.io:443/catalogdev
{}
<- 400
Elasticsearch DEBUG: 2018-03-28T06:17:19Z
Request complete
Connection fails: Bad Request :: {"path":"/catalogdev","query":{},"body":"{}","statusCode":400,"response":""}
@samuelbednarcik_twitter yes, you can.
sample:
{ "where": { "and": [ { "address.geo": { "geo_shape": { "address.geo": { "shape": { "type": "circle", "coordinates": [ 78.38214860577659, 17.44064909837838 ], "radius": "1km" }, "relation": "within" } } } }, { "entity_properties.value": { "gt": 50 } } ] } }
address and entity_properties in above query are nested objects
"elasticSearchDB": {
"connector": "es",
"name": "elasticSearchDB",
"index": "whatGoesHere?", ...
Hi all,
Updated Elastcsearch 6.x connector to 1.1.0
https://www.npmjs.com/package/loopback-connector-esv6