AnsweredAssumed Answered

Lucene search custom paging webscript.

Question asked by fserrano on May 16, 2012
Latest reply on May 24, 2012 by fserrano
Hi, I am trying to do a results pagination in one of our webscripts (with an HTML template). The search definition is the following:

var sort1 =
      column: FIELD_MODIFIED,
      ascending: false
   var paging =
    maxItems: limit,
    skipCount: start + (pagesize * (page-1))
   var def =
    query: "+TYPE:\"" + CUSTOM_TYPE + "\"",
    store: "workspace://SpacesStore",
    sort: [sort1],
    page: paging

It is working correctly, but I would like to know if is there any way to get the total amount of results ( the number it would obtain without applying any limit nor filters). The point would be implementing a pagination system in the html (but I need to know how many elements of type CUSTOM_TYPE are there in the repository without running the query unfiltered again). Any ideas? Thanks in advance.