Skip to the content
Documentation

exp:solr

No ratings yet

Available since Exponential 6.0.15 (in development, not in a release yet).

Summary

Control the Solr search server, once it is installed and configured

Usage

./console exp:solr [options]
php bin/php/solr.php [options]

Help

The output of ./console help exp:solr (the script run with --help), without the standard options:

Usage: bin/php/solr.php [OPTION]... [COMMAND]
Exponential Solr - control the Solr search server

Solr is optional. This installation uses the built-in eZ search index by
default (bin/php/updatesearchindex.php); Solr takes over only once it is
installed and turned on. Until then every verb below says so plainly and
start exits non-zero, so nothing silently pretends a search server is
running when none is.

Commands (same shape as exp:webserver):
  status      whether Solr is configured, and if so whether it answers
  start       start the local Solr instance (BinaryPath), or report that a
              remote Solr (Url) is managed externally
  stop        stop the local Solr instance
  restart     stop, then start
  ping        ask Solr whether it is alive

Enable Solr in settings/solr.ini (override in
settings/override/solr.ini.append.php):
  [SolrSettings]
  Enabled=true
  Url=http://127.0.0.1:8983          a running Solr to talk to, or
  BinaryPath=/opt/solr/bin/solr      the Solr control binary on this box
  Host=127.0.0.1  Port=8983  DataDir=/var/solr/data

With Url set, Solr is treated as remote/managed elsewhere: status and ping
reach it, start and stop do not. With BinaryPath set (and Url empty), this
command runs Solr's own start/stop/status for a local instance, keeping its
logs under var/vc/solr/ to match the Velocity layout.

Through the console:
  ./bin/php/console exp:solr status --allow-root-user
  ./bin/php/console exp:solr start --allow-root-user


Options:
  --json  Report as JSON, for a caller that is not a person

Options

Option Value Description
--json - Report as JSON, for a caller that is not a person

Arguments

[command]

Standard options

Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.

Source

bin/php/solr.php, kernel/private/classes/commands/solr.php

See also

Generated example: exp:solr

Added to the reference for Exponential 6.0.15.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.