Skip to main content

A super simple Solr Cli

Project description

solrcli - Solr CLI

Super simple (and small) Command Line Interface to perform frequend actions upon Solr instance.

Search features are provided from pysolr lib by Django Haystack.

Installation (not yet available)

pip install solrcli

Configuration

Solrcli can take parameters in two ways:

  • via a config file
  • via command line

Using config file allows you to set up different environments. See example below hosts.ini:

[test-server]
host=localhost:8893
core=core0

[production-server]
host=machine.production.priv:80
core=core0

You can choose enviroment in the command line as:

(venv) $ solrcli -c hosts.ini -i test-server reload

If you prefer to provide params each time you can pass --host and --core as application options before command.

Usage

Generic options

Print help informations for main command with solrcli --help. Use --help after the command to print specific options.

Usage: solrcli.py [OPTIONS] COMMAND [ARGS]...

Options:
  --host TEXT          Solr hostname with port
  --core TEXT          Solr core
  -c, --config TEXT    config file path
  -i, --instance TEXT  remote instance from config file
  --help               Show this message and exit.

Commands:
  fullimport
  getconfig
  reload

Reloading

Invoke core reload

(venv) $ solrcli --host=my-solr-instance.com --core=core0 reload

Configurations

Get config from Solr instance passing feature from the list below:

  • dataimport
(venv) $ solrcli --host=my-solr-instance.com --core=core0 getconfig --feature=dataimport

TODO

  • authentication
  • more robust config/parameters handling
  • deeper config inspection
  • focus results: perform a /search or similar and get back only interesting nodes
  • query using URL
  • v2 Api for Solr Cloud

Authors

License

This project is licensed under the GNU Affero General Public License v3.0 License - see the LICENSE file for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for solrcli, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size solrcli-0.1-py3-none-any.whl (16.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size solrcli-0.1.tar.gz (5.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page