Forums / Extensions / eZ Find / ez find numFound exceeds the actual number of results

ez find numFound exceeds the actual number of results

Author Message

Jim Thaxton

Thursday 29 October 2009 11:50:14 am

I am running into a problem where ez find is returning too large a number in the total number of items. This is causing my pagination to work incorrectly since the last 1/3 of the pagination links return empty pages.

This problem occurs all the time, including immediately after indexing and optimizing the search.

Any ideas?

We are making the calls to Solr via the ez find api.

All the individual pages that return content via the Solr search work and the results are accurate, it's merely that the total number of items returned is inaccurate.

Thanks in advance!
--Jim

Web Developer
Coupon Cabin
Chicago, IL

Paul Borgermans

Tuesday 03 November 2009 11:24:37 am

I can't reproduce this here, which versions of ezp and ez find are you using?

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Jim Thaxton

Tuesday 03 November 2009 3:50:30 pm

Thanks.

eZ Publish Version: 4.1.3 (4.1.3) SVN revision: 19785
eZ Find v2.0.0

We are running our site in three environments, my local box, a stage site and the production site. The stage site does not have this problem whereas my local box and production site do have the problem.

A related issue is that the search often returns bad objects (for lack of a better word) in the local and production environments. Our hack/work around to immediately solve that problem was to update the following snippet of code /kernel/classes/ezcontentobjecttreenode.php. These two problems are interlinked. If a version of the site returns too many results, it also has problems with the search sending back data to the object tree node script and vice versa.

Here is some background information on that issue

so i looked at the error log for 01 and it gave this on samm's failed searches
[Mon Nov 02 13:53:35 2009] [error] [client 66.92.135.21] PHP Fatal error: Call to a member function attribute() on a non-object in /var/www/www.luxgoddess.com/kernel/classes/ezcontentobjecttreenode.php on line 5604
so i added this condition to the offending file
object = $this->object();
if($class = $object->contentClass()){
$this->ClassName = $class->attribute( 'name' );
}else{
error_log("object error",0);
fixes it for the moment, but it's an obvious hack
let me know what you figure out on that

Web Developer
Coupon Cabin
Chicago, IL