With the most recent dev version (also for search_api and search_api_solr), I get the following error. It might be a configuration issue (string vs fulltext fields) or the code might depend on different module versions.
The website encountered an unexpected error. Please try again later.
Error: Call to a member function getText() on string in Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend->getExcerpt() (line 2203 of modules/contrib/search_api_solr/src/Plugin/search_api/backend/SearchApiSolrBackend.php).
Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend->getExcerpt(Array, '83u8st-solr_content-entity:media/10:de', Object, Array) (Line: 1441)
Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend->extractResults(Object, Object) (Line: 1016)
Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend->search(Object) (Line: 455)
Drupal\search_api\Entity\Server->search(Object) (Line: 493)
Drupal\search_api\Query\Query->execute() (Line: 437)
Drupal\search_api\Plugin\views\query\SearchApiQuery->execute(Object) (Line: 1412)
Drupal\views\ViewExecutable->execute(NULL) (Line: 1440)
Drupal\views\ViewExecutable->render() (Line: 412)
Drupal\rest\Plugin\views\display\RestExport->execute() (Line: 1616)
Drupal\views\ViewExecutable->executeDisplay('rest_export_1', Array) (Line: 78)
Drupal\views\Element\View::preRenderViewElement(Array)
call_user_func(Array, Array) (Line: 376)
Drupal\Core\Render\Renderer->doRender(Array, 1) (Line: 195)
Drupal\Core\Render\Renderer->render(Array, 1) (Line: 139)
Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 140)
Drupal\Core\Render\Renderer->renderRoot(Array) (Line: 395)
Drupal\rest\Plugin\views\display\RestExport::buildResponse('search', 'rest_export_1', Array) (Line: 52)
Drupal\views\Routing\ViewPageController->handle('search', 'rest_export_1', Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comments
Comment #2
kjauslin commentedPlease find patch attached. It prevents the error, but might not solve the root cause.
Comment #3
kjauslin commentedComment #4
mkalkbrennerInteresting, can you share some information about the field that is represented as string here?
Maybe this bug was introduced as TextValue was introduced in Search API.
Comment #5
prajaankit commentedComment #6
prajaankit commentedHi mkalkbrenner,
I face the same, This issue is ariese after the update module search Api solr from 8.x-1.0-rc2 to 8.x-1.0-rc4.
System configuration
Drupal version : 8.3.4
php version : 7.1
OS : centos
Solr version : 5.5.3
solr-conf : 6.x
All these fields Typ Full text are indexed.
As per updated module as well as update in solr-conf in solr files on server also.
Disable the index and again enable it, and again reindex all these fields, But unfortunately search is not working.
clear the cache drush cr several time.
Then i applied #2 patch its applied successfully
Now the search perform well, gives the expected results.
Any other information you want please let me know.
Thanks :)
Comment #7
prajaankit commentedComment #9
mkalkbrennerEven if this should not occur in a standard setup, I accept the patch for the initiative of supporting foreign indexes.