I'm trying to use facets on a field that allows nulls. I'm using indexNullAs as below and I was expecting that facets will give results also for this value, but my query returns 3 results (two entites which have values and one which has null) and facets return count equal 2 instead of 3.

currentFieldValue passed to addFacetDocValues has the actual value, so null in my case, and not the indexAsNull value, which I would expect.

Can someone explain to me if it is really inconsistent with the indexNullAs for field or my expectations are wrong and I just have to deal with the fact that facets can't be done on null values even when indexNullAs is used?