Mapping configuration are as follows:
es_mapping = {
'properties': {
'university': {
'type': 'object',
'properties': {
'name': {'type': 'text'},
}
},
'first_name': {'type': 'text'},
'last_name': {'type': 'text'},
'age': {'type': 'short'},
'year_in_school': {'type': 'text'},
'name_complete': {
'type': 'completion', # you have to make a method for completition for sure!
'analyzer': 'simple',
'payloads': True, # note that we have to provide payload while updating
'preserve_separators': True,
'preserve_position_increments': True,
'max_input_length': 50,
},
"course_names": {
"type": "text",
},
}
Using above mapping when script is getting executed it gives following error:
Error:
elasticsearch.exceptions.RequestError: TransportError(400, u'mapper_parsing_exception', u'Mapping definition for [name_complete] has unsupported parameters: [payloads : true]')
By commenting this mapping I tried to run script but it fails while loading data with the following error:
u'error': {u'caused_by': {u'reason': u'unknown field name [payload], must be one of [input, weight, contexts]', u'type': u'illegal_argument_exception'}, u'reason': u'failed to parse', u'type': u'mapper_parsing_exception'}