Strongloop Loopback connector for Elasticsearch
Do you think you have a good background to be an active contributor either from features contributions perspective or from a code reviewer perspective?
If your answer is yes from a code reviewer perspective then please ask the loopback team to make you a direct contributor to the project. I do not have such a privilege.
function (body) {
if (body.aggregations)
{
return done(null, body.aggregations) ;
}
var result = [];
body.hits.hits.forEach(function (item) {
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":""}