俄语字符以坏字符集返回

时间:2017-07-27 00:45:09

标签: elasticsearch character-encoding

在我的Centos 7工作站上,我有图像的elasticsearch(ver.5.5.1)服务:docker.elastic.co/elasticsearch/elasticsearch:5.5.1。

我工作站上的文件系统类型是xfs。

我的.tar存档与/ usr / share / elasticsearch / data / nodes / 0 /包含索引结构: (来自kibana的JSON)

{
  "_index": "fias-addrobj",
  "_type": "document",
  "_id": "00173aad-ae1a-413e-b73c-d9e573923ef9",
  "_score": 1,
  "_source": {
    "aoid": "00173aad-ae1a-413e-b73c-d9e573923ef9",
    "formalname": "УчительÑкий",
    "regioncode": "26",
    "offname": "УчительÑкий",
    "shortname": "проез",
    "aolevel": 7,
    "parentguid": "2a1c7bdb-05ea-492f-9e1c-b3999f79dcbc",
    "aoguid": "1a10726e-c22d-4ed0-b01e-ebe7bce46ddf",
    "actstatus": 1
  }
}

开始记录我的JVM参数:

  

JVM参数[           -Xms2g,-Xmx2g,-XX:+ UseConcMarkSweepGC,           -XX:CMSInitiatingOccupancyFraction = 75,           -XX:+ UseCMSInitiatingOccupancyOnly,           -XX:+ AlwaysPreTouch,-Xss1m,        -Djava.awt.headless = true,-Dfile.encoding = UTF-8,        -Djna.nosys = TRUE,   -Djdk.io.permissionsUseCanonicalPath = TRUE,   -Dio.netty.noUnsafe = TRUE,   -Dio.netty.noKeySetOptimization = TRUE,   -Dio.netty.recycler.maxCapacityPerThread = 0,-Dlog4j.shutdownHookEnabled = false,        -Dlog4j2.disable.jmx = TRUE,        -Dlog4j.skipJansi = TRUE,        -XX:+ HeapDumpOnOutOfMemoryError,        -Des.cgroups.hierarchy.override = /,        -Xms512m,-Xmx512m,-DFile.encoding = UTF-8,        -Des.path.home =的/ usr /共享/ elasticsearch           ]

有关formalname的问题 - 字符串,offname - 字符串,短名称 - 字符串错误的charset。

1 个答案:

答案 0 :(得分:0)

我只是想帮助你,但我的名声不多,所以我不能写评论......

无论如何,我也有很多经验“Charset”不匹配。 所以,我认为你还需要另外一个修改JVM选项的测试。

我在下面的Java选项中找到了两个相关的文档。

  

DOC1。   链接:https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-system-settings.html

     

DOC2。   链接:https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html

两个文件是修改其他选项,用于凝视elasticSearch,但JVM选项不依赖于elasticSearch。 所以,我认为尝试运行并不值钱。

  

ES_JAVA_OPTS =“ - dFile.encoding = UTF-8”./ bin / elasticsearch

  

export ES_JAVA_OPTS =“ - dFile.encoding = UTF-8”./ bin / elasticsearch