Fixed issue #1538 - Unable to reindex tickets / elasticsearch error "MapperParsingException[failed to parse [article.ticket]]; nested: JsonParseException[Current token (START_OBJECT) not of boolean type".
This commit is contained in:
parent
7b50730185
commit
036b364387
1 changed files with 6 additions and 7 deletions
|
@ -35,17 +35,16 @@ returns
|
|||
articles = Ticket::Article.where(ticket_id: id)
|
||||
attributes['article'] = []
|
||||
articles.each do |article|
|
||||
article_attributes = article.attributes
|
||||
|
||||
# remove note needed attributes
|
||||
ignore = %w(message_id_md5)
|
||||
ignore.each do |attribute|
|
||||
article_attributes.delete(attribute)
|
||||
end
|
||||
|
||||
# lookup attributes of ref. objects (normally name and note)
|
||||
article_attributes = article.search_index_attribute_lookup
|
||||
|
||||
# remove note needed attributes
|
||||
ignore = %w(message_id_md5 ticket)
|
||||
ignore.each do |attribute|
|
||||
article_attributes.delete(attribute)
|
||||
end
|
||||
|
||||
# index raw text body
|
||||
if article_attributes['content_type'] && article_attributes['content_type'] == 'text/html' && article_attributes['body']
|
||||
article_attributes['body'] = article_attributes['body'].html2text
|
||||
|
|
Loading…
Reference in a new issue