[TYPO3-Solr] tt_news, multiple single-pids and other problems

Joerg Sauskat j.sauskat at gmx.de
Sun Jun 23 17:50:32 CEST 2013


Hi Jigal,

its always the same: Devlog reports first this error "Could not resolve 
document score for relevance calculation" and immediately after this:

"1343670545: exception 'RuntimeException' with message 'Could not 
resolve document score for relevance calculation' in 
/var/www/(...)/typo3conf/ext/solr/classes/viewhelper/class.tx_solr_viewhelper_relevance.php:127 
Stack trace: #0 
/var/www/(...)/typo3conf/ext/solr/classes/viewhelper/class.tx_solr_viewhelper_relevance.php(80): 
tx_solr_viewhelper_Relevance->getScore('a:24:{s:2:"id";...') #1 
/var/www/(...)/typo3conf/ext/solr/classes/class.tx_solr_template.php(379): 
tx_solr_viewhelper_Relevance->execute(Array) #2 
/var/www/(...)/typo3conf/ext/solr/classes/class.tx_solr_template.php(344): 
tx_solr_Template->renderMarkerViewHelper(Object(tx_solr_viewhelper_RelevanceBar), 
'RELEVANCE_BAR', '???Gesucht nach...') #3 
/var/www/(...)/typo3conf/ext/solr/classes/class.tx_solr_template.php(271): 
tx_solr_Template->renderViewHelpers('???Gesucht nach...') #4 
/var/www/(...)/typo3conf/ext/solr/classes/pluginbase/class.tx_solr_pluginbase_commandpluginbase.php(171): 
tx_solr_Template->render() #5 
/var/www/(...)/typo3conf/ext/solr/classes/pluginbase/class.tx_solr_pluginbase_commandpluginbase.php(70): 
tx_solr_pluginbase_CommandPluginBase->renderCommand('results', Array) #6 
/var/www/(...)/typo3conf/ext/solr/classes/pluginbase/class.tx_solr_pluginbase_pluginbase.php(106): 
tx_solr_pluginbase_CommandPluginBase->render(NULL) #7 [internal 
function]: tx_solr_pluginbase_PluginBase->main('', Array) #8 
/usr/share/php/typo3_src-4.5.27/typo3/sysext/cms/tslib/class.tslib_content.php(6404): 
call_user_func_array(Array, Array) #9 
/usr/share/php/typo3_src-4.5.27/typo3/sysext/cms/tslib/content/class.tslib_content_user.php(56): 
tslib_cObj->callUserFunction('tx_solr_pi_resu...', Array, '') #10 
/usr/share/php/typo3_src-4.5.27/typo3/sysext/cms/tslib/class.tslib_content.php(922): 
tslib_content_User->render(Array) #11 
/usr/share/php/typo3_src-4.5.27/typo3/sysext/cms/tslib/class.tslib_fe.php(3322): 
tslib_cObj->USER(Array) #12 
/usr/share/php/typo3_src-4.5.27/typo3/sysext/cms/tslib/class.tslib_fe.php(3260): 
tslib_fe->INTincScript_process(Array) #13 
/usr/share/php/typo3_src-4.5.27/typo3/sysext/cms/tslib/index_ts.php(465): tslib_fe->INTincScript() 
#14 /usr/share/php/typo3_src-4.5.27/index.php(83): 
require('/usr/share/php/...') #15 {main}"

Extra Data shows this:
"Exceptionstring	exception 'RuntimeException' with message 'Could not 
resolve document score for relevance calculation' in 
/var/www/web-gruene/web-terpe/typo3conf/ext/solr/classes/viewhelper/class.tx_solr_viewhelper_relevance.php:127
Stack trace:
#0 
/var/www/web-gruene/web-terpe/typo3conf/ext/solr/classes/viewhelper/class.tx_solr_viewhelper_relevance.php(80): 
tx_solr_viewhelper_Relevance->getScore('a:24:{s:2:"id";...')
#1 
/var/www/web-gruene/web-terpe/typo3conf/ext/solr/classes/class.tx_solr_template.php(379): 
tx_solr_viewhelper_Relevance->execute(Array)
#2 
/var/www/web-gruene/web-terpe/typo3conf/ext/solr/classes/class.tx_solr_template.php(344): 
tx_solr_Template->renderMarkerViewHelper(Object(tx_solr_viewhelper_RelevanceBar), 
'RELEVANCE_BAR', '???Gesucht nach...')
#3 
/var/www/web-gruene/web-terpe/typo3conf/ext/solr/classes/class.tx_solr_template.php(271): 
tx_solr_Template->renderViewHelpers('???Gesucht nach...')
#4 
/var/www/web-gruene/web-terpe/typo3conf/ext/solr/classes/pluginbase/class.tx_solr_pluginbase_commandpluginbase.php(171): 
tx_solr_Template->render()
#5 
/var/www/web-gruene/web-terpe/typo3conf/ext/solr/classes/pluginbase/class.tx_solr_pluginbase_commandpluginbase.php(70): 
tx_solr_pluginbase_CommandPluginBase->renderCommand('results', Array)
#6 
/var/www/web-gruene/web-terpe/typo3conf/ext/solr/classes/pluginbase/class.tx_solr_pluginbase_pluginbase.php(106): 
tx_solr_pluginbase_CommandPluginBase->render(NULL)
#7 [internal function]: tx_solr_pluginbase_PluginBase->main('', Array)
#8 
/usr/share/php/typo3_src-4.5.27/typo3/sysext/cms/tslib/class.tslib_content.php(6404): 
call_user_func_array(Array, Array)
#9 
/usr/share/php/typo3_src-4.5.27/typo3/sysext/cms/tslib/content/class.tslib_content_user.php(56): 
tslib_cObj->callUserFunction('tx_solr_pi_resu...', Array, '')
#10 
/usr/share/php/typo3_src-4.5.27/typo3/sysext/cms/tslib/class.tslib_content.php(922): 
tslib_content_User->render(Array)
#11 
/usr/share/php/typo3_src-4.5.27/typo3/sysext/cms/tslib/class.tslib_fe.php(3322): 
tslib_cObj->USER(Array)
#12 
/usr/share/php/typo3_src-4.5.27/typo3/sysext/cms/tslib/class.tslib_fe.php(3260): 
tslib_fe->INTincScript_process(Array)
#13 
/usr/share/php/typo3_src-4.5.27/typo3/sysext/cms/tslib/index_ts.php(465): tslib_fe->INTincScript()
#14 /usr/share/php/typo3_src-4.5.27/index.php(83): 
require('/usr/share/php/...')
#15 {main}
*code	1343670545
*file 
/var/www/web-gruene/web-terpe/typo3conf/ext/solr/classes/viewhelper/class.tx_solr_viewhelper_relevance.php
*line	127"


In frontend I get this sometime directly after I submit the searchword 
or sometimes if I switch between result pages.

Best regards
Joerg


Am 23.06.2013 08:42, schrieb Jigal van Hemert:
> Hi,
>
> On 22-6-2013 21:06, Joerg Sauskat wrote:
>> First:
>> The result-items for tt_news don't show the rich (real)url, only
>> "www.mydomain.ch" and not for example
>> "www.mydomain.ch/seite1/thema/detail/news/irgendwas.html"
>
> If this happens it's usually that definition of the url in de
> index.queue configuration is somehow wrong. You have your configuration
> below, so let's take a look there.
>
>> Second:
>> If i use the facet-option "news" to show only the news entrys, i get "Es
>> tut uns leid. Ihre Suchanfrage konnte nicht verarbeitet werden."
>
> If this happens take a look at the devlog immediately afterwards. There
> is probably an error logged. You can expand the details by clicking the
> [+] in the right column. In those details it will mention the URL that
> was requested from the solr server. If you perform that action yourself
> you can see the response of the solr server. Maybe there is an error
> message and you can investigate further.
>
>> This is my configuration:
>>
>> - Apache Solr for Typo3 2.8.2
>> - PHP 5.3.5
>> - Typo3 4.5.27
>> - Apache Solr: 3.6.2 (3.6.2.2012.12.18.19.52.27)
>> - schema.xml: tx_solr-2-8-0--20120925
>> - solrconfig.xml: tx_solr-2-8-0--20120925
>>
>> I've got four news categories with each single-Pid to show the news
>> depending the categories.
>
> This is not supported in the configuration that is shipped with Solr.
> You have to adjust the configuration to use that single Pid.
>
>> News stored in an sysfolder inside the root. The categories stored in
>> another sysfolder inside the root.
>>
>> My constants (tt_news single-Pids):
>> (...)
>> plugin.tt_news.useBidirectionalRelations = 1
>> plugin.tt_news.singlePid = 3078
>
> You'll find that only this singlePid is used in the solr configuration.
>
>> plugin.tx_solr.index.queue {
>>      tt_news = 1
>>      tt_news {
>>          fields {
> [...]
>>              categoryMain_stringS = TEXT
>>              categoryMain_stringS {
>>                  cObject = SOLR_RELATION
>>                  cObject {
>>                      localField = category
>>                      relationTableSortingField = sorting
>>                      singleValueGlue = ,
>>                  }
>>
>>                  split {
>>                      token = ,
>>                      returnKey = 0
>>                  }
>>              }
>
> You've already figured out how to retrieve the main category. With the
> foreignLabelField you can retrieve the single pid field for that category.
>
>>              url = TEXT
>>              url {
>>                  typolink.parameter = {$plugin.tt_news.singlePid}
>
> Now the default single pid setting from tt_news is used. In your case
> the single pid is defined by the setting in the category. Here you'll
> have to lookup the single pid for the category and use that as value for
> the typolink.parameter property.
>



More information about the TYPO3-project-solr mailing list