es本地测试没问题服务器上面7x4版本



```java
[0;31m[2021-08-30 17:29:00:955] [ERROR] [JobRunner-128-com.onion.health.website.task.ArticleESHandleTask] [   ] [ArticleESHandleTask] handle article file error!Elasticsearch excep
[0m [type=mapper_parsing_exception, reason=failed to parse field [bewrite] of type [text] in document with id '61488'. Preview of field's value: '']
ElasticsearchStatusException[Elasticsearch exception [type=mapper_parsing_exception, reason=failed to parse field [bewrite] of type [text] in document with id '61488'. Preview of f
ield's value: '']]; nested: ElasticsearchException[Elasticsearch exception [type=json_parse_exception, reason=Unrecognized character escape (CTRL-CHAR, code 0)
 at [Source: (byte[])"{"bewrite":"<p><p align=\"center\"><img title=\"一岁宝宝有哪些营养需求\" alt=\"一岁宝宝需要补充什么营养 一岁宝宝饮食要注意什么 一岁宝宝的营养补充\" src=\"http
://image.luzhua.com/image/2020-04-2916/1588150322073RvPhMdmJd9.JPG\" border=\"0\" /></p>\n<p>  一岁宝宝的食量还很小,消化系统的吸收能力很有限,他根本吃不下亦不可能完全从固体食物
中消化吸收足够的营养素。因此,保证宝宝的健康,营养?"[truncated 2127 bytes]; line: 1, column: 841]]];
        at org.elasticsearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:176)
        at org.elasticsearch.client.RestHighLevelClient.parseEntity(RestHighLevelClient.java:1933)
        at org.elasticsearch.client.RestHighLevelClient.parseResponseException(RestHighLevelClient.java:1910)
        at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1667)
        at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1624)
        at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1594)
        at org.elasticsearch.client.RestHighLevelClient.index(RestHighLevelClient.java:1011)
        at com.onion.server.container.res.ds.es.ESBaseDAO.insert(ESBaseDAO.java:434)
        at com.onion.health.system.article.dao.es.ArticleESDAO.addArticle(ArticleESDAO.java:38)
        at com.onion.health.system.article.ao.es.ArticleESAO.addArticle(ArticleESAO.java:32)
        at com.onion.health.system.article.service.impl.ArticleServiceImpl.initHandleArticle(ArticleServiceImpl.java:263)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.onion.server.container.invoke.ProxyFactory.invoke(ProxyFactory.java:128)
        at com.onion.server.container.invoke.LocalInvocationHandler.invoke(LocalInvocationHandler.java:20)
        at com.onion.server.container.invoke.DynamicProxyHandler.invoke(DynamicProxyHandler.java:44)
        at com.sun.proxy.$Proxy12.initHandleArticle(Unknown Source)
        at com.onion.health.website.task.ArticleESHandleTask.run(ArticleESHandleTask.java:47)
        at com.onion.server.job.BaseJob.runJob(BaseJob.java:157)
        at com.onion.server.job.JobScheduler$1.run(JobScheduler.java:166)
        Suppressed: org.elasticsearch.client.ResponseException: method [PUT], host [http://127.0.0.1:9200], URI [/article_musa/_create/61488?version=-4&timeout=1m], status line [HT
TP/1.1 400 Bad Request]

```

同一个数据库 同一条数据

数据里面有特殊字符,但是这无法避免的 有没有公共方法可以处理

复制到UE 里面 16进制查看是7F

在使用es索引数据的时候发现如果数据中有ascii码在32以下的,比如1A等等的。就会索引报错。比如我数据中显示的是个->,但是用16进制查看是个1A,这个时候索引数据就报错。有没有方法能设置es自动忽略这种特殊字符。把他们当做普通的字符索引?

刚刚是 ascii 127 DEL (delete) 这部分特殊字符谁知道怎么排除吗?

你好,我是有问必答小助手,非常抱歉,本次您提出的有问必答问题,技术专家团超时未为您做出解答


本次提问扣除的有问必答次数,将会以问答VIP体验卡(1次有问必答机会、商城购买实体图书享受95折优惠)的形式为您补发到账户。


因为有问必答VIP体验卡有效期仅有1天,您在需要使用的时候【私信】联系我,我会为您补发。