src/searchOld/elastic/Search.php
protected static function dataTypeToIndexField($type)
    {
        $key = '';
        $currentLang = LanguageHelper::getCurrent();
        switch ($type) {
            case Property::DATA_TYPE_STRING :
                $key = 'str_value_' . $currentLang;
                break;
            case Property::DATA_TYPE_TEXT :
                $key = 'txt_value_' . $currentLang;
                break;
            case Property::DATA_TYPE_BOOLEAN :
            case Property::DATA_TYPE_INTEGER :
                $key = 'value_integer';
                break;
            case Property::DATA_TYPE_FLOAT :
                $key = 'value_float';
                break;
            case Property::DATA_TYPE_INVARIANT_STRING :
            case Property::DATA_TYPE_PACKED_JSON :
                $key = 'utr_text';
                break;
        }
        return $key;
    }
protected static function dataTypeToIndexField($type)
    {
        $key = '';
        $currentLang = LanguageHelper::getCurrent();
        switch ($type) {
            case Property::DATA_TYPE_STRING :
                $key = 'str_value_' . $currentLang;
                break;
            case Property::DATA_TYPE_TEXT :
                $key = 'txt_value_' . $currentLang;
                break;
            case Property::DATA_TYPE_BOOLEAN :
            case Property::DATA_TYPE_INTEGER :
                $key = 'value_integer';
                break;
            case Property::DATA_TYPE_FLOAT :
                $key = 'value_float';
                break;
            case Property::DATA_TYPE_INVARIANT_STRING :
            case Property::DATA_TYPE_PACKED_JSON :
                $key = 'utr_text';
                break;
        }
        return $key;
    }
protected static function dataTypeToIndexField ( $ type ) { $ key = '' ; $ currentLang = LanguageHelper :: getCurrent ( ) ; switch ( $ type ) { case Property :: DATA_TYPE_STRING : $ key = 'str_value_' . $ currentLang ; break ; case Property :: DATA_TYPE_TEXT : $ key = 'txt_value_' . $ currentLang ; break ; case Property :: DATA_TYPE_BOOLEAN : case Property :: DATA_TYPE_INTEGER : $ key = 'value_integer' ; break ; case Property :: DATA_TYPE_FLOAT : $ key = 'value_float' ; break ; case Property :: DATA_TYPE_INVARIANT_STRING : case Property :: DATA_TYPE_PACKED_JSON : $ key = 'utr_text' ; break ; } return $ key ; }
Cast property data_type to elastic index column

@param $type
@return string
Cast property data_type to elastic index column