[Xapian-discuss] Result count before fetch

Ivo Jansch - Ibuildings ivo at ibuildings.nl
Sun May 17 19:40:42 BST 2009


Hi,

I'm working on Xapian integration for Zend Framework, and while writing 
the wrappers, I was wondering about the following from the example code:

    $matches = $enquire->get_mset(0, 10);
 
      // Display the results.
      $this->view->count = $matches->get_matches_estimated();

To be able to use the Xapian results in a Zend_Paginator, I would like 
to retrieve the amount of matches _before_ I retrieve them using 
get_mset. Is this possible?

I thought about using $enquier->get_mset(0,1)->get_matches_estimated()

but that would mean an extra get_mset call per pageload, which would 
seem inefficient.

Greetings,
Ivo




More information about the Xapian-discuss mailing list