att / rcloud

Collaborative data analysis and visualization
http://rcloud.social
MIT License
430 stars 142 forks source link

opening a search result, and then paging search, crashes #2631

Closed gordonwoodhull closed 4 years ago

gordonwoodhull commented 5 years ago
  1. Search for text which occurs in more than 10 notebooks
  2. Click on any result to load the notebook
  3. Click on page 2 or higher
Error: search: Error in if (nn > start + pagesize) { : argument is of length zero
R trace:
sc_build_response(self, private, start, pagesize)
self$build_response(start, pagesize)
sc_search(self, private, all_sources, start, pagesize, sortby,
orderby, ...)
.SC$search(query = query, all_sources = all_sources, sortby = sortby,
orderby = orderby, start = start, pagesize = pagesize, max_pages = max_pages,
group.limit = group.limit, hl.fragsize = hl.fragsize)
fun(...)
at success (https://rcloud-5.research.att.com/js/rcloud_bundle.js:32:23)
From previous event:
at Object.search (https://rcloud-5.research.att.com/js/rcloud_bundle.js:38:54)
at https://rcloud-5.research.att.com/js/rcloud_bundle.js:12117:31
From previous event:
at Object.RCloud.UI.with_progress (https://rcloud-5.research.att.com/js/rcloud_bundle.js:11352:10)
at Object.exec (https://rcloud-5.research.att.com/js/rcloud_bundle.js:12116:23)
at go_to_page (https://rcloud-5.research.att.com/js/rcloud_bundle.js:11900:30)
at HTMLDivElement.<anonymous> (https://rcloud-5.research.att.com/js/rcloud_bundle.js:12069:37)
at HTMLDivElement.dispatch (https://rcloud-5.research.att.com/lib/js/jquery-2.1.1.js:4409:9)
at HTMLDivElement.elemData.handle (https://rcloud-5.research.att.com/lib/js/jquery-2.1.1.js:4095:28)
at Object.trigger (https://rcloud-5.research.att.com/lib/js/jquery-2.1.1.js:4324:12)
at HTMLDivElement.<anonymous> (https://rcloud-5.research.att.com/lib/js/jquery-2.1.1.js:4875:17)
at Function.each (https://rcloud-5.research.att.com/lib/js/jquery-2.1.1.js:375:23)
at jQuery.fn.init.each (https://rcloud-5.research.att.com/lib/js/jquery-2.1.1.js:139:17)
at jQuery.fn.init.trigger (https://rcloud-5.research.att.com/lib/js/jquery-2.1.1.js:4874:15)
at HTMLLIElement.paginationClick (https://rcloud-5.research.att.com/lib/js/jquery.bootpag.js:122:24)
at HTMLLIElement.dispatch (https://rcloud-5.research.att.com/lib/js/jquery-2.1.1.js:4409:9)
at HTMLLIElement.elemData.handle (https://rcloud-5.research.att.com/lib/js/jquery-2.1.1.js:4095:28)
gordonwoodhull commented 5 years ago

It could be the session reset. (I forget if we use the compute session for search for some reason.)

After the error, if you then click on page 1, you can click on any page after that.

I think we discussed this way back. The results are cached to make clicking on later pages quick. Seems that the cache gets blown away somehow.

s-u commented 4 years ago

Yes, rcloud.solr would not re-run the query if start > 0 even if there were no cached results.

https://github.com/att/rcloud.solr/blob/develop/R/search-controller.R#L178