Skip to main content
Files added late

2 files were added to this release more than 14 days after its initial publication. Inspect the release files before installing.

Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Getting Started

Installation

This package is a document manager for mongo-connector.

The easiest way to get started is to install solr-doc-manager at the same time as mongo-connector with pip:

pip install mongo-connector[solr]

If you already have mongo-connector installed, install solr-doc-manager via:

pip install solr-doc-manager

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

git clone https://github.com/mongodb-labs/solr-doc-manager
cd solr-doc-manager
python setup.py install

You may have to run python setup.py install with sudo, depending on where you’re installing mongo-connector and what privileges you have.

For information on running mongo-connector with Solr, please see https://github.com/mongodb-labs/mongo-connector/wiki/Usage%20with%20Solr

Running the tests

Requirements

  1. Copy of the solr-doc-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/mongodb-labs/solr-doc-manager
  1. Solr

The integration tests require Solr to be running. To set up and run Solr:

curl -O http://archive.apache.org/dist/lucene/solr/4.9.1/solr-4.9.1.tgz
tar -zxf solr-4.9.1.tgz
cp mongo_connector/doc_managers/schema.xml solr-4.9.1/example/solr/collection1/conf/
cd solr-4.9.1/example/ && java -Djetty.port=8983 -Dsolr.solr.home=solr -jar start.jar > /dev/null 2>&1 &

Solr will be running on http://localhost:8983/solr

  1. Mongo Orchestration

Mongo Connector runs MongoDB on its own using another tool called Mongo Orchestration. This package should install automatically if you run python setup.py test, but the Mongo Orchestration server still needs to be started manually before running the tests:

mongo-orchestration --bind 127.0.0.1 --config orchestration.config start

will start the server. To stop it:

mongo-orchestration --bind 127.0.0.1 --config orchestration.config stop

The location of the MongoDB server should be set in orchestration.config. For more information on how to use Mongo Orchestration, or how to use it with different arguments, please look at the Mongo-Orchestration README.

  1. Environment variables

There are a few influential environment variables that affect the tests. These are:

  • DB_USER is the username to use if running the tests with authentication enabled.

  • DB_PASSWORD is the password for the above.

  • MONGO_PORT is the starting port for running MongoDB. Future nodes will be started on sequentially increasing ports.

  • SOLR_URL is the address on which Solr is running.

  • MO_ADDRESS is the address to use for Mongo Orchestration (i.e. hostname:port)

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 Solr before doing a full test run!

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

python setup.py test

In addition, you can be more selective with which tests you run (in Python > 2.6 only)! For example, if you only wanted to run the Solr doc manager tests:

python -m unittest tests.test_solr_doc_manager

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.

Release files for solr-doc-manager 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Files added late

2 files were uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release files before installing.

Source distribution (sdist)

Source distribution for solr-doc-manager 0.1.0
File Size Uploaded
solr-doc-manager-0.1.0.tar.gz 14.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for solr-doc-manager 0.1.0
File Interpreter ABI Platform
solr_doc_manager-0.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 25.1 kB

Release files / solr-doc-manager-0.1.0.tar.gz

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL solr-doc-manager-0.1.0.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0509621741d9a4775ae027bf517a921a089f28ed41613b38d222e068a08734d8
BLAKE2b-256 checksum
How to use checksums
b7728441b708598776e147092c0a577adcba7ef0cf8e367225e43251624f99dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / solr_doc_manager-0.1.0-py2.py3-none-any.whl

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL solr_doc_manager-0.1.0-py2.py3-none-any.whl
Size 10.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a4d53f1669cc5ffb9854d65ccaf1b516273d24544e064321d2fa3f1d74557e80
BLAKE2b-256 checksum
How to use checksums
517b42fdc8fd4308efa0a09f07df31f7e6c9285a1aa9b86e773a0c536864ec47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page