Elastic 7.X Определение корневого отображения имеет неподдерживаемые параметры - PullRequest
0 голосов
/ 31 октября 2019

После обновления с 6.X до 7.X

Я получил следующую ошибку при создании индекса

RequestError(400, 'mapper_parsing_exception', 
'Root mapping definition has unsupported parameters:  
       [speechanalytics-transcript : {
               properties={
                 transcript_operator={similarity=scripted_tfidf, type=text}}]')

Тело запроса

{
        'settings': {
            'similarity': {
                'scripted_tfidf': {
                    'type': 'scripted',
                    'script': {'source': 'double tf = doc.freq; return query.boost * tf;'},
                },
            },
        },
        'mappings': {
            'speechanalytics-transcript': {
             'properties': {
               'transcript_operator':{
                  'type': 'text',
                  'analyzer': 'standard',
                 'similarity': 'scripted_tfidf',
               }
              }
           }
        }
    }

1 Ответ

0 голосов
/ 31 октября 2019

В новой версии был удален тип отображения https://www.elastic.co/guide/en/elasticsearch/reference/6.7/removal-of-types.html

необходимо изменить отображение

    'mappings': {
        'speechanalytics-transcript': {
         'properties': {
           'transcript_operator':{
              'type': 'text',
              'analyzer': 'standard',
             'similarity': 'scripted_tfidf',
           }
          }
       }
    }

на

    'mappings': {
         'properties': {
           'transcript_operator':{
              'type': 'text',
              'analyzer': 'standard',
             'similarity': 'scripted_tfidf',
           }
        }
    }
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...