|
|
@ -12,6 +12,7 @@ json.results do
|
|
|
|
# 附件的替换
|
|
|
|
# 附件的替换
|
|
|
|
atta_reg = /!\[]\(\/api\/attachments\/\d+\)/
|
|
|
|
atta_reg = /!\[]\(\/api\/attachments\/\d+\)/
|
|
|
|
highlights[:description]&.first&.sub!(reg, '')&.sub!(atta_reg, '')
|
|
|
|
highlights[:description]&.first&.sub!(reg, '')&.sub!(atta_reg, '')
|
|
|
|
|
|
|
|
Rails.logger.info("#########serach_description#{highlights[:description]}------------#{highlights[:description]&.first}")
|
|
|
|
highlights[:content]&.first&.sub!(reg, '')&.sub!(atta_reg, '')
|
|
|
|
highlights[:content]&.first&.sub!(reg, '')&.sub!(atta_reg, '')
|
|
|
|
|
|
|
|
|
|
|
|
json.content highlights
|
|
|
|
json.content highlights
|
|
|
|