Solr Search module - error when configuring the search page

Hi everyone,

I am pretty new to Omeka and it’s the first time I’ve tried to use Solr on it, so I’m sorry if the answer is obvious. I use the v. 2.0.2 of Omeka-S and I’m trying to use the Solr module (v. 0.5.0) and the Search module (v. 0.5.0) . I have also install the Jquery-UI module which is needed.

I have follow the instructions from the github page :

_I installed the Solr instance
_ I have configured the Solr module (host, port, etc.)
_I have created a new index in the search module and I managed to launch the “reindex button”.
_I have created a new page in the search module but after filling in the first page (with name, path, index and form) this error appears on the second page :

Notice: Undefined variable: facetFields in /sites/rita/www/web_main/modules/Solr/src/Adapter.php on line 134
Warning: count(): Parameter must be an array or an object that implements Countable in /sites/rita/www/web_main/modules/Search/src/Form/Admin/SearchPageConfigureForm.php on line 69
Warning: Invalid argument supplied for foreach() in /sites/rita/www/web_main/modules/Search/src/Form/Admin/SearchPageConfigureForm.php on line 72

And I think I don’t have all the option available because I cannot enable or disable facet and sort fields.

Do you know what the problem may be ?

Thanks a lot for your help.

Best,

Remi Ossant

Hi,
The modules are not up to date. Try my versions, that are fully working in Omeka S 2.1 (example : https://bibnum.explore.psl.eu): https://github.com/Daniel-KM/Omeka-S-module-Search and https://github.com/Daniel-KM/Omeka-S-module-Solr .

1 Like

Hi Daniel,

Thanks for your answer, I tried your versions of the modules and indeed it worked perfectly well!

Thanks a lot!

Hi,

Unfortunatelly, I have others problems with the module … When I’m lauching the reindexation on the solr module, the log show me this error :

#0 /sites/rita/www/web_main/modules/Solr/src/Indexer/SolrIndexer.php(273): SolrClient->addDocument(Object(SolrInputDocument))
#1 /sites/rita/www/web_main/modules/Solr/src/Indexer/SolrIndexer.php(125): Solr\Indexer\SolrIndexer->addResource(Object(Omeka\Entity\Item))
#2 /sites/rita/www/web_main/modules/Search/src/Job/Indexing.php(164): Solr\Indexer\SolrIndexer->indexResources(Array)
#3 /sites/rita/www/web_main/application/src/Job/DispatchStrategy/Synchronous.php(34): Search\Job\Indexing->perform()
#4 /sites/rita/www/web_main/application/src/Job/Dispatcher.php(105): Omeka\Job\DispatchStrategy\Synchronous->send(Object(Omeka\Entity\Job))
#5 /sites/rita/www/web_main/application/data/scripts/perform-job.php(43): Omeka\Job\Dispatcher->send(Object(Omeka\Entity\Job), Object(Omeka\Job\DispatchStrategy\Synchronous))
#6 {main}
2020-04-15T13:39:22+00:00 INFO (6): Indexing resource #62 (items)
2020-04-15T13:39:22+00:00 ERR (3): Indexing of resource 62 failed
2020-04-15T13:39:22+00:00 ERR (3): SolrServerException: ERROR: [doc=items:62] unknown field ‘dcterms_temporal_dr’ in /sites/rita/www/web_main/modules/Solr/src/Indexer/SolrIndexer.php:273

It happens to about half of my items, but the indexation managed to finish.

And I have another problem with the form, when I try to put it on a page I have this error :

Error: Unsupported operand types in /sites/rita/www/web_main/modules/Search/src/Site/BlockLayout/SearchingForm.php:34
Stack trace:
#0 /sites/rita/www/web_main/application/src/View/Helper/BlockLayout.php(101): Search\Site\BlockLayout\SearchingForm->form(Object(Zend\View\Renderer\PhpRenderer), Object(Omeka\Api\Representation\SiteRepresentation), Object(Omeka\Api\Representation\SitePageRepresentation), Object(Omeka\Api\Representation\SitePageBlockRepresentation))
#1 /sites/rita/www/web_main/application/src/View/Helper/BlockLayout.php(70): Omeka\View\Helper\BlockLayout->form(‘searchingForm’)
#2 /sites/rita/www/web_main/application/view/omeka/site-admin/page/edit.phtml(23): Omeka\View\Helper\BlockLayout->forms(Object(Omeka\Api\Representation\SitePageRepresentation))
#3 /sites/rita/www/web_main/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php(506): include(’/sites/rita/www…’)
#4 /sites/rita/www/web_main/vendor/zendframework/zend-view/src/View.php(207): Zend\View\Renderer\PhpRenderer->render(NULL)
#5 /sites/rita/www/web_main/vendor/zendframework/zend-view/src/View.php(236): Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#6 /sites/rita/www/web_main/vendor/zendframework/zend-view/src/View.php(200): Zend\View\View->renderChildren(Object(Zend\View\Model\ViewModel))
#7 /sites/rita/www/web_main/vendor/zendframework/zend-mvc/src/View/Http/DefaultRenderingStrategy.php(105): Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#8 /sites/rita/www/web_main/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\View\Http\DefaultRenderingStrategy->render(Object(Zend\Mvc\MvcEvent))
#9 /sites/rita/www/web_main/vendor/zendframework/zend-eventmanager/src/EventManager.php(171): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent))
#10 /sites/rita/www/web_main/vendor/zendframework/zend-mvc/src/Application.php(367): Zend\EventManager\EventManager->triggerEvent(Object(Zend\Mvc\MvcEvent))
#11 /sites/rita/www/web_main/vendor/zendframework/zend-mvc/src/Application.php(348): Zend\Mvc\Application->completeRequest(Object(Zend\Mvc\MvcEvent))
#12 /sites/rita/www/web_main/index.php(21): Zend\Mvc\Application->run()
#13 {main}

Also when I’m reaching the page with the search bar and I’m lauching a search, there is no result, but I assume this is related to a problem that I mentionned before.

Thanks a lot for your help,

Best

Apparently, you have a field that is not in the mapping. Did you removed it during indexation?

For the other point, it’s a bug (that doesn’t appear with another module I use). It will be fixed Monday with the next release.
And this is still an experimental feature.

Thanks a lot for your answer @Daniel_KM, I will wait the next release and keep you inform.

About the problem with the indexation, indeed the problem came form the mapping, I checked it and I replaced the Solr field which is attached to dcterms_temporal by another and then the indexation worked for all my items.

Thanks again for your help and your hard work!

Best,

I pushed a new release of module Search (and Solr if needed), with new features, in particular the possibility to use it as a block.

1 Like