I'm using Elastica and I need to create the filter that will get NULL values along with values that lower than 100.
For now my code looks like this:
$this->filter = $qb->query()->bool();
$this->filter->addShould($qb->query()->range('price', ['lte' => 100]));
It returns data with price lower than 100. I also need to get data with null values. So far I tried:
$this->filter->addMustNot($qb->query()->exists('price')); // returns 0 items
$this->filter->addShould($qb->query()->missing('price')); // doesn't work. Gives undefined query "missing" in Facade.php
Could someone help me with this issue? Or how to fix the problem with undefined query "missing" or to create another filter that will fit my needs. Thanks.