Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Search backends

The search options a host can offer for Exponential sites: the built-in database search with its limits and delayed indexing, rebuilding the index, the optional Solr search through the eZ Find extension, the exp:solr…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/hosting/basics/search-backends.md

On this page

Search backends

This page is for product managers and system administrators at a hosting company who decide whether Exponential sites get the built-in search only or an optional Solr search server, and who run either. It answers: how the built-in search works and what it needs, when indexing happens, how to rebuild the index, and what Solr through the eZ Find extension involves. Sources: chapter 10.8, settings/site.ini [SearchSettings], settings/solr.ini and Server control commands.

Contents

  1. The two options
  2. The built-in search
  3. Delayed indexing and cron
  4. Rebuilding the index
  5. Solr through eZ Find
  6. The exp:solr command
  7. Offering search in a plan
  8. Checklist
  9. Related pages

The two options

Built-in searchSolr through eZ Find
EngineeZSearchEngine (site.ini [SearchSettings] SearchEngine)the ezfind extension with a Solr server
Index lives inthe site's databasethe Solr server
Extra service to runnonea Solr server, local or remote
Installed by defaultyesno: composer.json suggests se7enxweb/ezfind
On MongoDBrun the cronjobs once after the install to build the indexnot stated in this repository

The built-in engine keeps its index in the database, so it needs nothing beyond the site itself. Its limits, from settings/site.ini [SearchSettings]:

KeyShippedMeaning
MaximumSearchLimit30the most results a request may ask for
MaximumSearchTextWords, MaximumSearchTextLength16, 1024longer search texts are cut
AllowEmptySearchdisabledempty searches take a lot of resources
EnableWildcardfalsewildcard search "might heavily influence the performance"
LogSearchStatsdisabledthe statistics store every phrase a visitor typed, which can hold personal data

Note

Keep LogSearchStats off unless a customer needs the statistics and has considered the personal data they hold. This is not legal advice; customers must take their own counsel on what they may store.

Delayed indexing and cron

Content is indexed when it is published, unless [SearchSettings] DelayedIndexing is enabled (or classbased with DelayedIndexingClassList[]): then publishing only queues the object in the table ezpending_actions, and the default cron part's indexcontent.php indexes it later. Publishing large objects is faster that way.

For a host this means: a site with delayed indexing depends on cron. Without the cronjobs, new content never appears in search. Make sure the default cron part runs for every such site (Cron jobs).

Rebuilding the index

After an import, a database move, or when search results are wrong:

php bin/php/updatesearchindex.php --clean --allow-root-user      # --clean removes the old index first

Run it as the site's user, and on a large site in a quiet hour. With eZ Find, reindex with the extension's own tools (chapter 14).

Solr through eZ Find

eZ Find is "a Solr based advanced search engine for Exponential with a lot more features than the built in search" (composer.json suggest). Adding it to a site:

composer require se7enxweb/ezfind:~3.0.7
php bin/php/ezpgenerateautoloads.php -e

then ActiveExtensions[]=ezfind in settings/override/site.ini.append.php, clear the INI cache and restart Velocity if it serves the site (chapter 3.5). This repository does not state which Solr versions eZ Find needs; take that from the extension's own repository before offering Solr, rather than assuming it.

settings/solr.ini tells the installation where Solr is. Solr is off until switched on:

# settings/override/solr.ini.append.php
[SolrSettings]
Enabled=true
# a running Solr, local or remote, base URL with scheme and port
Url=http://127.0.0.1:8983
# or, for a Solr installed on this machine and managed by exp:solr:
#BinaryPath=/opt/solr/bin/solr
#Host=127.0.0.1
#Port=8983
#DataDir=
KeyShippedMeaning
Enabledfalsemaster switch
Urlemptya running Solr; with it set, Solr is treated as managed elsewhere
BinaryPathemptythe Solr control binary of a local instance (used when Url is empty)
Host, Port127.0.0.1, 8983where a local Solr listens
DataDiremptySolr's own default applies
RunDir, LogDirvar/vc/solr/run, var/vc/solr/logpid and log files
StartTimeout60seconds start waits for Solr to answer

The exp:solr command

php bin/php/console exp:solr status --allow-root-user
php bin/php/console exp:solr ping --allow-root-user
php bin/php/console exp:solr start --allow-root-user      # local instance only
VerbWhat it does
statuswhether Solr is configured and, if so, whether it answers
start, stop, restartrun Solr's own start and stop for a local instance (BinaryPath); with a remote Url they report that it is managed elsewhere
pingask Solr whether it is alive

Until Solr is configured, every verb says so and start exits non-zero, so a monitoring check never mistakes "not configured" for "running" (Server control commands).

Offering search in a plan

Options a host can choose from:

  • Built-in search only. Nothing extra to run; suits most sites.
  • Solr as an add-on, on a Solr server the host runs for several customers (Url set) or on the customer's dedicated server (BinaryPath). Plan its memory and disk separately from PHP, and back up or be able to rebuild its index.
  • Customer-provided Solr. Url points at it; exp:solr status and ping check it, start and stop are the customer's.

Tip

Whatever you offer, add exp:solr status to monitoring for sites with Solr, and a check that the cronjobs run for sites with delayed indexing.

Checklist

  • To do: Every site knows its engine: SearchEngine and, for eZ Find, [SolrSettings] Enabled.
  • To do: Cron runs the default part where DelayedIndexing is on.
  • To do: LogSearchStats off unless a customer asked for it.
  • To do: Solr's memory, disk and backups planned when offered.
  • To do: exp:solr status in monitoring for Solr sites.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x