Git Product home page Git Product logo

elastic2-doc-manager's Introduction

elastic2-doc-manager

The mongo-connector project originated as a MongoDB mongo-labs project and is now community-maintained under the custody of YouGov, Plc.

View build status

Getting Started

This package is a document manager for mongo-connector that targets Elasticsearch versions 2.x and 5.x -- don't let the name fool you! For information on running mongo-connector with Elasticsearch, please see the MongoConnector Usage with Elasticsearch wiki page.

Installation

The installation of the elastic2-doc-manager depends on which version of Elasticsearch you are targeting.

Elasticsearch 1.x

This is the document manager for Elasticsearch 2.x and 5.x. If you want to target Elasticsearch 1.x, please install the elastic-doc-manager.

Elasticsearch 2.x

For use with an Elasticsearch 2.x server, install with pip:

pip install 'elastic2-doc-manager[elastic2]'

Elasticsearch 5.x

For use with an Elasticsearch 5.x server, install with:

pip install 'elastic2-doc-manager[elastic5]'

Note

Version 0.3.0 added support for Elasticsearch 5.x.

Amazon Elasticsearch Service

To use with Amazon Elasticsearch Service, you must install the required AWS dependencies along with the version of Elasticsearch:

pip install 'elastic2-doc-manager[elastic2,aws]'

Development

You can also install the development version of elastic2-doc-manager manually:

git clone https://github.com/yougov/elastic2-doc-manager.git
pip install -e './elastic2-doc-manager[elastic2]'

You may have to run pip with sudo, depending on where you're installing and what privileges you have.

Note

Please note that before mongo-connector version 2.2.2, the elastic

doc manager was packaged with mongo-connector and only supported Elasticsearch 1.x.

Running the tests

Requirements

  1. Copy of the Elastic 2.x Document Manager Github repository

The tests are not included in the package from PyPI and can only be acquired by cloning this repository on Github:

git clone https://github.com/yougov/elastic2-doc-manager
  1. Tox
Install tox.
  1. Environment variables
There are a few influential environment variables that affect the tests. These are defined in the tox.ini.

All the tests live in the tests directory.

Running tests on the command-line

While the tests take care of setting up and tearing down MongoDB clusters on their own, make sure to start Elasticsearch before doing a full test run!

You can run all the tests with one command (this works in all supported Python versions):

tox

Error messages

Some of the tests are meant to generate lots of ERROR-level log messages, especially the rollback tests. mongo-connector logs exceptions it encounters while iterating the cursor in the oplog, so we see these in the console output while MongoDB clusters are being torn apart in the tests. As long as all the tests pass with an OK message, all is well.

elastic2-doc-manager's People

Contributors

shaneharvey avatar aherlihy avatar jaraco avatar sliwinski-milosz avatar sha1sum avatar ianwhalen avatar ghaughian avatar

Watchers

James Cloos avatar Ravishankar Jayaraman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.