Search
Caution
The search page and its Solr emulator exist only on the demo
branch, not on kitodo/.
The demo branch adds a search page (dlf_) that works without a
real Apache Solr server. The extension talks to Solr through Solarium over
plain HTTP, so the demo ships a minimal Solr HTTP emulation that implements
just enough of the Solr JSON API for the read-only demo plugins
(dlf_, dlf_, dlf_, dlf_) to
work.
How it works
- The emulator (
Build/) is included from the demo's static data router (Demo/ assets/ solr- emulator. php Build/). Any request under theDemo/ assets/ data- router. php /solr/prefix is answered with a Solr-style JSON response; anything else falls through to static file serving. - It implements the endpoints the extension uses: the core status probe
(
/admin/, which the Solr constructor uses to decide the core is "ready"), the select / search requests (cores?action=STATUS /<core>/) and the update endpoint (select /<core>/) that the real indexer pushes documents to.update - The documents to search over are the local sample documents; they are "indexed" by the regular indexer into the emulator's in-memory JSON catalog.
The page
The /search page renders the dlf_ form and the results.
Clicking a result opens the document in the single-document viewer on the root
page. The Solr core record and the extension's Solr connection are pointed at
the local data server running the emulator, so no external Solr is contacted.