0

Is it possible to use Slice via solrTemplate ?

actually I am struggling to see if it will even make a difference because even without using spring, there doesnt appear to be any way of telling Solr to exclude its "numFound" (total results) from a queryenter image description here

And when I use a normal spring data Page<..> query , when I look under the hood I only see one query issued to solr, i.e. no extra one for count. Or is the count simply done inside Solr somehow in an extra step ?

confused

1977
  • 2,580
  • 6
  • 26
  • 37

1 Answers1

0

Total document count is part of the Solr query. No additional query is required. Therefore, there is no advantage to Slice vs. Page.

The only related concept is when somebody wants to export a significant amount of data, in which case built-in paging becomes slower the further is data requested. For that, Solr has exporting functionality.

Alexandre Rafalovitch
  • 9,709
  • 1
  • 24
  • 27