Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    caiyufei
    @caiyufei
    We plan to connect elasticsearch in loopback framework , but https://github.com/strongloop-community/loopback-connector-elastic-search has NOT been updated since June 2017 , Will it be deprecated ?
    @raymondfeng In loopback framework project, connect ES , insert into ES , query data from ES , any connector to use ? https://github.com/strongloop-community/loopback-connector-elastic-search has NOT been updated since June 2017 , Will it be deprecated ?
    Pulkit Singhal
    @pulkitsinghal
    Hello @caiyufei, it’s a community plugin. As a contributor I have at least no plans to deprecate it. Contributions from the community come in the form of PRs and if we are lucky then they also come with tests. If we are even luckier then we see at least one other contributor like @aquid look over the code, run the tests and give a thumbs up for code review. The process is slow because the contributors have day jobs and loopback experts at IBM themselves haven’t yet made any commitment to helping with code reviews, which is fine.

    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.

    caiyufei
    @caiyufei
    Hi, @pulkitsinghal , Thanks for your quick reply. Our search project is using loopback framework and is looking for a plugin or something else to connect to Elasticsearch. Thanks for your loopback-connector-elasticsearch. We decide to try to use it. If we have requirement to add/update features we will contribute.
    caiyufei
    @caiyufei
    @pulkitsinghal Do you have any plan to upgrade elasticsearch client from version 12 to 14 , the v14 supports ES api 6.0
    Shubham Thakur
    @sbmthakur
    Hi @caiyufei , I've submitted a PR upgrading the client. You can follow the progress here: strongloop-community/loopback-connector-elastic-search#106
    Steven
    @onstrike07
    I'm not sure if there is any improvement on aggregation support in the latest connector. If not, I have an idea on it by using native keyword. The current version doesn't work for aggregation even you use native keyword because the connector always returns hits.hits from the result body. It should return aggregations node for an 'aggs' query. To fix it, we can just check availability of 'aggregations'. If it's true, return it; otherwise, does normally.
        function (body) {
          if (body.aggregations)
          {
            return done(null, body.aggregations) ;
          }
          var result = [];
          body.hits.hits.forEach(function (item) {
    I tested it and it worked.
    image.png
    Pulkit Singhal
    @pulkitsinghal
    This message was deleted
    Bharath Reddy Kontham
    @bharathkontham
    hi all
    I've updated plugin to support Elasticsearch 6.x
    Will update documentation soon
    Pulkit Singhal
    @pulkitsinghal
    Thanks for contributing!
    Bharath Reddy Kontham
    @bharathkontham

    An overview on updates in https://github.com/bharathkontham/loopback-connector-elastic-search

    • Only Elasticsearch 6.x is supported, ES 5.x or older version may or may not work.
    • Currently only one Index can be configured in one ES datasource of loopback (working on multiple indices configuration support) but we can use same datasource multiple loopback models.
    • A keyword field "docType" is used to store model names which provides support to use same Mapping Type of a single index for storing multiple models. This is major change in connector as earlier version used different mapping types to store different loopback models.
    • Nested objects querying (array of objects type in loopback), geo spatial queries and like, nlike are supported.

    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.

    Bharath Reddy Kontham
    @bharathkontham

    Updated example for Elasticsearch 6.x in https://github.com/bharathkontham/loopback-connector-elastic-search

    Please check examples/server/datasources.sample-es-6.js

    Pulkit Singhal
    @pulkitsinghal

    @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.

    Bharath Reddy Kontham
    @bharathkontham
    @pulkitsinghal - I would like to work on that, add me to strongloop community.
    Pulkit Singhal
    @pulkitsinghal
    1. Soon I will cut a branch
    2. Ask for you to be added as a contributor
    3. Document which branch to merge your PRs into for your 6.x work ... also for any other users and contributors that come along.
    Can’t commit to a imprint but that’s the plan :)
    Jeff Hoffer
    @eudaimos
    @pulkitsinghal can you please help me understand the version tagging in this repo? Why are there v1.3.x tags and 1.3.x tags with the same version, both of which will show a commit making the same change in the package.json version field to the same value?
    Shubham Thakur
    @sbmthakur
    @pulkitsinghal Hi Pulkit, you had removed the index key from datasource-test-v6-plain.json(sbmthakur-master branch). After restoring it all filter tests passed. I am unable to comprehend your intention behind that change. Was it done to test any breaking change in ES 6?
    Pulkit Singhal
    @pulkitsinghal
    @eudaimos publishing might have failed midway with npm-release so the second attempt may have occurred with npm publish with a minor difference in the syntax where v was omitted or vice versa
    @sbmthakur in ESv6, types are no longer supported ... what used to be a type in the past should either get its own index or it should be implemented by the connector as a field inside the document ... either way, a global index is not universally applicable and it would be presumptuous of me to continue with that as the default approach ... with such thoughts in mind I removed it and tried to play around with tests ... the failures are meant to show where more work is needed in the absence of a universal index for all types
    Pulkit Singhal
    @pulkitsinghal

    @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.

    Cc @aquid
    Jeff Hoffer
    @eudaimos
    thanks @pulkitsinghal but it's consistent across each 1.3.* release - also I see that there's a commit with a message of release/1.4.1 but there is not tag for 1.4.1 - was this intentional?
    Pulkit Singhal
    @pulkitsinghal
    I don’t remember so I’ll add it to my todo list to dig into this and get back to you ... in the meantime let me know how this is blocking you so I gain a better sense of priority
    Bharath Reddy Kontham
    @bharathkontham
    @pulkitsinghal - I'll attend the meetup in pune.
    Can you create a branch for 6.x work with es-6.x or any name
    Pulkit Singhal
    @pulkitsinghal
    @bharathkontham - treat feature/esv6 as your "develop" ... create feature/esv6/featurename branches from it and PR/merge them back to feature/esv6 and the releases branches can be used to publish the package under the name loopback-connector-esv6 on npmjs
    Bharath Reddy Kontham
    @bharathkontham
    loopback-connector-esv6 updated to 1.0.1.
    check release notes here:
    https://github.com/strongloop-community/loopback-connector-elastic-search/releases/tag/1.0.1
    Bharath Reddy Kontham
    @bharathkontham

    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

    Pulkit Singhal
    @pulkitsinghal
    Nice
    Anouar Kacem
    @anouarkacem
    Hi guys I have an issue with auth
            "protocol": "https",
            "host": "scalr.api.appbase.io",
            "port": "443",
            "auth": "username:password"
          }
    im trying to connect to appbase which is an elastic search server however in my debugger i have this result
    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":""}
    Anouar Kacem
    @anouarkacem
    any idea why its not authenticating ? thank you
    Bharath Reddy Kontham
    @bharathkontham
    @anouarkacem It's not an authentication issue.
    appbase.io is not supporting all elasticsearch APIs. In the debug info it is HEAD API which is not supported by appbase.io
    Anouar Kacem
    @anouarkacem
    @bharathkontham thank you for your answer
    Pulkit Singhal
    @pulkitsinghal
    👏
    Siddharth Kothari
    @siddharthlatest
    Hey everyone, @bharathkontham reached out about the issue and we have just added support for the HEAD APIs. @anouarkacem can you verify if this works now?
    Anouar Kacem
    @anouarkacem
    @siddharthlatest well I updated the package but the have same error, also I can't see the PR on github can you please share it here, thank you for reaching out
    Bharath Reddy Kontham
    @bharathkontham
    @anouarkacem there is no PR for this. appbase.io added support for Index HEAD API.
    can you share the connector version? is it esv6 or es connector?
    https://rest.appbase.io/#2e9a1a76-ca3d-da8e-2cf0-5c5b793038c9
    Anouar Kacem
    @anouarkacem
    @bharathkontham I got it, but I am not sure what it doesn't work I have the same result
    Siddharth Kothari
    @siddharthlatest
    @anouarkacem sorry to hear. If you or someone here would be willing to create a sandbox code (or a repl) snippet, I can have someone from our team take a look if this is an issue from our end.