Catalog search
This page is for library and archive managers deciding how readers will search the catalog, and for the website
creator who sets it up. It explains what the built-in search does, how to learn from what readers search for, and when
the extra work of a Solr server through ezfind pays off.
Contents
- Two engines
- The built-in search
- What gets indexed
- Searching inside files
- Learning from what readers search
- When Solr is worth it
- Switching to Solr, in outline
- Browsing complements searching
- Search checklist
Two engines
| Built-in engine | Solr through ezfind | |
|---|---|---|
| Installed with the product | Yes (SearchEngine=eZSearchEngine) | No: se7enxweb/ezfind is a Composer suggestion, plus a separate Solr server |
| Find records by words | Yes | Yes |
| Relevance ranking and boosting | Basic | Yes |
| Facets (filter by class, tag, date) | No | Yes |
| Very large numbers of objects | Slows down | Built for it |
| Tag clouds from search | No | Yes |
Sources: Search with ezfind and Solr
and the suggest block of composer.json.
The built-in search
site.ini [SearchSettings] SearchEngine=eZSearchEngineindexes the attributes marked Searchable when content is published. "Visitors only find what they may read", so restricted records stay hidden from the public.content/searchtakes a search box;content/advancedsearchoffers more fields (phrase, class, date), useful for a catalog: "books only, published after 2000".- Shipped limits include
MaximumSearchLimit=30results per page and wildcards off (EnableWildcard=false), becauseterm*searches are "costly on large sites".
Source: Site search.
What gets indexed
Mark only useful fields Searchable: "titles, intros, bodies; not internal codes" (same page). For a catalog, also mark the identifiers readers type, such as an ISBN, and the creators' names on Person objects.
Subject headings from eztags are indexed with their synonyms by default (IndexSynonyms=enabled), so a reader who
types a non-preferred term still finds the record (Tagging and subject headings).
After a large import, rebuild the whole index:
php bin/php/updatesearchindex.php --clean --allow-root-userWith DelayedIndexing enabled, content is indexed by cron instead of on publish, which keeps publishing fast during
imports (Site search, Indexing).
Searching inside files
settings/binaryfile.ini has handlers that extract text from PDF and Word files for the search index
([PDFHandlerSettings], [WordHandlerSettings]), "using external programs you install". With Solr, file contents can
be indexed too (Files and downloads, Searching inside files).
Ask your hosting partner to install the extraction programs if digitized documents should be found by their text.
Note
Text extraction works on documents that contain text. A scan stored only as an image has no text to extract unless it was made searchable (with OCR) before upload. The code and settings of the repository contain no OCR feature, so do that step in your scanning software.
Learning from what readers search
With LogSearchStats=enabled on the public siteaccess, Setup > Search statistics (/search/stats) shows every
phrase, how often it was searched and the average number of results; "phrases that found nothing show what content is
missing". Phrases can be personal data, which is why logging is off by default
(Site search, Search statistics).
Use it monthly: searches with no results point to missing records, missing synonyms, or spelling variants to add as tag synonyms. Decide with your data protection contact whether to switch it on and how long to keep the phrases.
When Solr is worth it
Consider Solr when one of these is true:
- To do: Readers need to narrow results by facets (format, subject, date, language).
- To do: The catalog has grown to the point where searches slow down.
- To do: Relevance ranking matters (best matches first) and the built-in ranking is not good enough.
- To do: The full text of many files must be searchable.
And weigh the cost: "Solr is a separate server (Java) to install, run, monitor and back up. For a small site the built-in engine is fine" (Search with ezfind and Solr). For hosting, see Search backends.
Switching to Solr, in outline
- Install a Solr server (locally, or a remote one).
- Set
[SolrSettings] Enabled=trueand its address insettings/override/solr.ini.append.php. - Check with
./console exp:solr status, thenping. - Install and activate
ezfind; its settings switch[SearchSettings] SearchEnginetoezsolr. - Clear the INI cache and rebuild the index.
Source: Search with ezfind and Solr, Switching it on
and Server control commands. content/search keeps working;
facets need templates that use ezfind's own fetch functions.
Browsing complements searching
Many readers browse rather than search. Give them:
- subject pages from tags (Tagging and subject headings);
- collections as containers in the menu (Modeling catalog records);
- a "new acquisitions" list and feed (Feeds for new acquisitions).
Search checklist
- To do: Searchable set on purpose for each field of each record class.
- To do: A search results template that shows the number of results, paging and what to try when nothing is found.
- To do: Advanced search offered if readers need class or date filters.
- To do: Index rebuilt after every large import.
- To do: Text extraction programs installed if file contents must be found.
- To do: Search statistics decided (on or off, retention) with the data protection contact.
- To do: A dated decision on Solr: not yet, or planned with a hosting partner.
Related pages
- Libraries and catalogs
- Site search
- Search with ezfind and Solr
- Searching (for editors)
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
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.