I discussed this with @mollux earlier and I don't think that a result can have a count of NULL. A count of zero is allowed but having "nothing" is invalid as that means that the facet doesn't exist.

We should change that in the documentation of the ResultInterface and Result class.

This should also change default value of $count to 0 instead of NULL.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

borisson_ created an issue. See original summary.

borisson_’s picture

Status: Active » Needs review
FileSize
3.01 KB
borisson_’s picture

Status: Needs review » Fixed

  • borisson_ committed 5906270 on 8.x-1.x
    Issue #2912392 by borisson_: Result count shouldn't be nullable
    
pwaterz’s picture

Does this patch allow for showing facets that have a count of 0?

borisson_’s picture

I don't see why it would make that impossible - this is just about the default value ("NULL", not "0") of the result value object.

pwaterz’s picture

Borisson I'm trying to figure out why when I have solr setup to return empty facets why the facet module chooses to not display them. If can create another ticket, if needed. I can do the fix, just need a little guidance.

borisson_’s picture

Yeah, it's be great if you could create a new support request issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.