Command-line tools for managing document stores like Qdrant and Solr
Project description
docstore-manager
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
- Installation
- Quick Start
- Documentation
- Configuration
- Examples
- Testing
- Changelog
- Contributing
- License
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docstore_manager-0.1.2.tar.gz.
File metadata
- Download URL: docstore_manager-0.1.2.tar.gz
- Upload date:
- Size: 94.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a06da57668d3a2a23ce4ad72bfdcb1941572f317c0d5e3d7f57488cea2415cc
|
|
| MD5 |
5a6863d287f6acb88217f6f561c2d01f
|
|
| BLAKE2b-256 |
13a533fa09034ce65a3ffed7f958c97264f2f3700d353206d541c99bef3bde8c
|
File details
Details for the file docstore_manager-0.1.2-py3-none-any.whl.
File metadata
- Download URL: docstore_manager-0.1.2-py3-none-any.whl
- Upload date:
- Size: 122.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
812a95fbd5b0e73a799d60f237f26e07b7037799fe3d300137ff29d807a58867
|
|
| MD5 |
0ea00906211a44b95d84d666dd13f35e
|
|
| BLAKE2b-256 |
d1f9320c12741e888e6f518267e6bfa802e773f747fd32e527c970d39d7cdbcd
|