eZ\Publish\Core\Search\Elasticsearch\Content\SortClauseVisitor\FieldBase::getNestedFilterTerm PHP Method

getNestedFilterTerm() protected method

If given $languageCode is not null the condition targets the field document in the given translation, otherwise document for translation in main language code is returned.
protected getNestedFilterTerm ( null | string $languageCode ) : mixed
$languageCode null | string
return mixed
    protected function getNestedFilterTerm($languageCode)
    {
        if ($languageCode === null) {
            return array('fields_doc.meta_is_main_translation_b' => true);
        }
        return array('fields_doc.meta_language_code_s' => $languageCode);
    }