jbdemonte / mongoose-elasticsearch-xp

A mongoose plugin that indexes models into Elasticsearch 2 / 5 / 6 and 7
93 stars 34 forks source link

Support elastic v6.x and v7.x #54

Closed Elyx0 closed 5 years ago

Elyx0 commented 5 years ago

In every test/*/model-mapping.js

It seems that using latest mongoose+mongodb4 in replica mode returns the company so the:

  1) model-mapping
       should not be blocked by a non populated "es_type schema":

      AssertionError: expected { Object (first, last, ...) } to deeply equal { first: 'Maurice', last: 'Moss' }
      + expected - actual

       {
      -  "company": {
      -    "_id": "5cd28850eb78414bcc04d22c"
      -  }
         "first": "Maurice"
         "last": "Moss"
       }

Were failing so I patched them I'll revert if needed.

Mongo Docker:

mongodb:
image: mongo:4.0.9
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null
command: [--auth]
command: [--replSet,rs0]
command: [--master]
volumes:
- mongovolume:/data/db
ports:
- "27017:27017"
coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.7%) to 91.247% when pulling a1f72b6421b4c7377f8405454d80539b153b9150 on Elyx0:master into 26173752797718502694d13686c7a7c4a5bfad30 on jbdemonte:master.

nodkz commented 5 years ago

@Elyx0 wow! Amazing work! 👍👍👍

Can I ask you to make small improvements:

1) Add v7 export and in readme recommend to import by exact version rather than via default import. It helps in future to do not break somebody's code when will be added v8 v9 etc.

2) We should decide what to do with The examples below use the version 5 syntax. sentence in README. Upgrade examples till v7 and bump a new major 6.0.0 version. Or keep v5 by default, leave examples as is and bump a minor version 5.7.0 (for me and other users it will be preferred variant).

Elyx0 commented 5 years ago

I'm not sure how to bump the version from the weird "version": "0.0.0-semantically-released", syntax 🤔

nodkz commented 5 years ago

The version will be chosen by semantic-release automatically after passing TravisCI tests. See https://github.com/semantic-release/semantic-release#how-does-it-work

jbdemonte commented 5 years ago

:tada: This PR is included in version 5.7.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

jbdemonte commented 5 years ago

Thanks guys, It's very cool to see the project move forward, while I have to time to work on it!