This question about Using an extension: Asked

facet search load problems in solrsearchview

Several aspects of the solrsearchview under websearch are not working properly. I have installed and am working with NatSkin on Foswiki 2.1.2 and solr 5.0. I installed Solr as outlined on the foswiki site. the SOLRSEARCH macro appears to work perfectly and see entries in the solr logs so I believe the solr server is installed correctly. But clicking on tags (in topic headings) results in endless loading on the solrsearchview page.

Also, when I select facets on the sidebar or in the tagcloud on the solrsearchview page, the page does not update, and (none) remains under Your Selection. Selected entries in the tagcloud do not remain highlighted. However, the url gets updated with the addition of #fq=tag%3Asequencing for the example of a tag named sequencing. If I then manually reload the page I again end up with an endless loading cycle. If I instead simply use the search field, the url is updated with #q=sequencing, the page updates and shows the results of the search. So the problem only arises working with facets.

Under plugins it says the solr version is from 18 Oct 2015. I made sure all the listed dependencies are installed from the solrplugin page. I have attached the solr log from the search for tag 'sequencing' that results in an endless load cycle.

I have looked extensively at the other support questions, but haven't found the same problem or a fix. We have had this problem since we first install foswiki a year ago so any input is very much appreciated.

-- KarlDuderstadt - 19 Dec 2016

Enabling the system path fixed this issue. This is in Configure->General Settings->File System Paths->Safe PATH. For me this is set to /bin:/usr/bin for Ubuntu 14.04.

With the system path disabled I was getting the following error in the browser console: TypeError: paramString.match is not a function. (In 'paramString.match{"^{!(.*)\\w+:"+value)', 'paramString' is undefined)

This was caused by a for loop that seemed to go beyond its bounds due to a grep command that couldn't execute (?). It seems very strange to me. I dumped each cycle of the loop to the console by adding a console output line to ajax-solr-widgets.js (see attachments - code from js file). This generated the output seen in the attached file browser_log_paramString_error. I discovered the same issue in two other loops in other js files in the solr code.

Before discovering the path issue, I added if statements inside each of these loops to exclude loop cycles with 'grep' - if (i = 'grep') { //contents of loop } When I added this if state to ajax-solr-widgets.js and ajax-solr.js the solr plugin seemed to work without problems even with the system path left disabled. I have attached the modified files in case anyone needs them to fix related issues - they would need to be added to /pub/System/SolrPlugin replacing the files with the corresponding names and possibly other related compressed, uncompressed versions.

I think setting the System Path should be included in solr setup instructions so others don't have this issue. I am also puzzled why the code has this issue and whether there is a way to resolve it with the system path left unset.

-- KarlDuderstadt - 06 Jan 2017

I spoke too soon. Even with the the Safe PATH set, I am still getting the error. I have to use the patched js files attached for it to work. I would be interested to know if other are having similar problems and whether these issues might be connected with a configuration problem.

-- KarlDuderstadt - 09 Jan 2017
 

QuestionForm edit

Subject Using an extension
Extension SolrPlugin
Version Foswiki 2.1.2
Status Asked
Related Topics
I Attachment Action Size Date Who Comment
ajax-solr-widgets.jsjs ajax-solr-widgets.js manage 40 K 06 Jan 2017 - 08:27 KarlDuderstadt corrected widgets js file
ajax-solr.jsjs ajax-solr.js manage 57 K 06 Jan 2017 - 08:28 KarlDuderstadt corrected ajax-solr.js file
browers_log_paramString_error.tifftiff browers_log_paramString_error.tiff manage 424 K 06 Jan 2017 - 08:26 KarlDuderstadt error in browser with field output from each cycle.
code from js file.tifftiff code from js file.tiff manage 225 K 06 Jan 2017 - 08:26 KarlDuderstadt js code to generate browser console output
endless loading.tifftiff endless loading.tiff manage 70 K 19 Dec 2016 - 11:42 KarlDuderstadt  
solrlog.rtfrtf solrlog.rtf manage 6 K 19 Dec 2016 - 11:41 KarlDuderstadt  
Topic revision: r3 - 09 Jan 2017, KarlDuderstadt
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy