code: protected function mapSearchFieldValue($value, FieldType $searchFieldType = null)
      {
          if (null === $searchFieldType) {
              return $value;
          }
  
          $searchField = new SearchField('field', $value, $searchFieldType);
          $value = (array)$this->fieldValueMapper->map($searchField);
  
          return current($value);
      }
docs: Map search field value to solr value using FieldValueMapper.
  
  @param mixed $value
  @param \eZ\Publish\SPI\Search\FieldType $searchFieldType
  
  @return mixed