Skip to main content

docstore-manager

PyPI Documentation Tests License

A general-purpose command-line tool for managing document store databases, currently supporting Qdrant vector database and Solr search platform. Simplifies common document store management tasks through a unified CLI interface.

Table of Contents

Key Features

  • Multi-platform Support:

    • Qdrant vector database for similarity search and vector operations
    • Solr search platform for text search and faceted navigation
  • Collection Management:

    • Create, delete, and list collections
    • Get detailed information about collections
  • Document Operations:

    • Add/update documents to collections
    • Remove documents from collections
    • Retrieve documents by ID
  • Search Capabilities:

    • Vector similarity search (Qdrant)
    • Full-text search (Solr)
    • Filtering and faceting
  • Batch Operations:

    • Add fields to documents
    • Delete fields from documents
    • Replace fields in documents
  • Advanced Features:

    • Support for JSON path selectors for precise document modifications
    • Multiple configuration profiles support
    • Flexible output formatting (JSON, YAML, CSV)

Installation

# From PyPI (recommended)
pipx install docstore-manager

# From source
git clone https://github.com/allenday/docstore-manager.git
cd docstore-manager
pipx install -e .

For detailed installation instructions, see the Installation Guide.

Quick Start

Qdrant Quick Start

# Create a new collection
docstore-manager qdrant create --collection my-collection

# Add documents
docstore-manager qdrant add-documents --collection my-collection --file documents.json

# Search for similar vectors
docstore-manager qdrant search --collection my-collection --vector-file query_vector.json --limit 5

Solr Quick Start

# Create a new collection
docstore-manager solr create --collection my-collection

# Add documents
docstore-manager solr add-documents --collection my-collection --file documents.json

# Search for documents
docstore-manager solr search --collection my-collection --query "title:example" --fields "id,title,score"

Documentation

Comprehensive documentation is available at https://allenday.github.io/docstore-manager/.

Documentation Sections

  • User Guide: Installation, configuration, and basic usage instructions
  • API Reference: Detailed documentation of all modules and functions
  • Developer Guide: Architecture, extension points, and contributing guidelines
  • Examples: Comprehensive usage examples for both Qdrant and Solr

Configuration

When first run, docstore-manager will create a configuration file at:

  • Linux/macOS: ~/.config/docstore-manager/config.yaml
  • Windows: %APPDATA%\docstore-manager\config.yaml

Example configuration:

default:
  # Common settings for all document stores
  connection:
    type: qdrant  # or solr
    collection: my-collection

  # Qdrant-specific settings
  qdrant:
    url: localhost
    port: 6333
    api_key: ""
    vectors:
      size: 256
      distance: cosine
      indexing_threshold: 0
    payload_indices:
      - field: category
        type: keyword

  # Solr-specific settings
  solr:
    url: http://localhost:8983/solr
    username: ""
    password: ""
    schema:
      fields:
        - name: id
          type: string
        - name: title
          type: text_general

You can switch between profiles using the --profile flag:

docstore-manager --profile production list

For detailed configuration options, see the Configuration Guide.

Examples

Qdrant Examples

# List all collections
docstore-manager qdrant list

# Get info about a collection
docstore-manager qdrant info --collection my-collection

# Search using vector similarity
docstore-manager qdrant search --vector-file query_vector.json --limit 10

# Batch update documents
docstore-manager qdrant batch --filter '{"key":"category","match":{"value":"product"}}' \
  --add --doc '{"processed": true}'

Solr Examples

# List all collections
docstore-manager solr list

# Add documents from a file
docstore-manager solr add-documents --collection my-collection --file documents.json

# Search documents
docstore-manager solr search --collection my-collection --query "title:example" --fields "id,title,score"

# Remove documents by query
docstore-manager solr remove-documents --collection my-collection --query "category:obsolete"

For more examples, see the Examples Documentation.

Testing

This project uses pytest for testing:

# Run unit tests
pytest -v

# Run integration tests (requires running services)
RUN_INTEGRATION_TESTS=true pytest -m integration -v

# Run all tests
RUN_INTEGRATION_TESTS=true pytest -v

Changelog

v0.1.2 (2025-05-20)

  • Added missing dependencies

v0.1.1 (2025-05-04)

  • Bug fixes and documentation improvements
  • Updated dependency requirements
  • Enhanced error handling

v0.1.0 (2025-05-03)

  • Initial release of docstore-manager
  • Support for both Qdrant and Solr document stores
  • Comprehensive usage examples for all operations
  • Improved error handling and logging
  • Standardized interfaces across document store implementations
  • Configuration profiles for different environments
  • Command-line interface for managing collections and documents
  • Detailed documentation and API reference

For the full changelog, see the Changelog.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

For development setup and guidelines, see the Contributing Guide.

License

Apache-2.0

Metadata

Release files for docstore-manager 0.1.2

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

Source distribution (sdist)

Source distribution for docstore-manager 0.1.2
File Size Uploaded
docstore_manager-0.1.2.tar.gz 94.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for docstore-manager 0.1.2
File Interpreter ABI Platform
docstore_manager-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 217.1 kB

Release files / docstore_manager-0.1.2.tar.gz

Download URL docstore_manager-0.1.2.tar.gz
Size 94.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2a06da57668d3a2a23ce4ad72bfdcb1941572f317c0d5e3d7f57488cea2415cc
BLAKE2b-256 checksum
How to use checksums
13a533fa09034ce65a3ffed7f958c97264f2f3700d353206d541c99bef3bde8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.17

Release files / docstore_manager-0.1.2-py3-none-any.whl

Download URL docstore_manager-0.1.2-py3-none-any.whl
Size 122.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
812a95fbd5b0e73a799d60f237f26e07b7037799fe3d300137ff29d807a58867
BLAKE2b-256 checksum
How to use checksums
d1f9320c12741e888e6f518267e6bfa802e773f747fd32e527c970d39d7cdbcd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.17

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

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