AntonShuvaev / elasticsearch4idea

Elasticsearch Plugin for JetBrains IDEs
https://plugins.jetbrains.com/plugin/14512-elasticsearch
59 stars 8 forks source link

Unable to parse unicode value: cm_c #23

Closed chirag4semandex closed 3 years ago

chirag4semandex commented 3 years ago

With the latest version 0.5.0, getting this error when fetching any result in IJ. Here is a snapshot. Hope it helps. Capture

AntonShuvaev commented 3 years ago

Hi @chirag4semandex,

Can you provide a response to this request? Probably it contains some characters that cause the problem with UnicodeUnescaper().translate(...).

chirag4semandex commented 3 years ago

Here is a sample response I got for size=2 request on Kibana, maybe the filePath value could be the culprit

{
  "took" : 1,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 10000,
      "relation" : "gte"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "dec-test",
        "_type" : "_doc",
        "_id" : "file_2381062746398531117",
        "_score" : 1.0,
        "_source" : {
          "sourceId" : "source_4",
          "updateTime" : "2020-12-11T22:45:39.735Z",
          "@id" : "file_2381062746398531117",
          "@type" : "Trace",
          "propertyBundle" : [
            {
              "@type" : "ContentData"
            },
            {
              "accessedTime" : "2016-12-16T07:13:23Z",
              "modifiedTime" : "2016-12-16T07:13:23Z",
              "fileName" : "ucm_ca_cert",
              "filePath" : """sec_efs\ucm_ca_cert""",
              "@type" : "File",
              "isDirectory" : true
            },
            {
              "fileType" : "_dir",
              "fileTypeName" : "Directory",
              "disposition" : "Overt",
              "hits" : [ ],
              "@type" : "MyType",
              "@parentId" : "file_2381062746398522893"
            },
            {
              "sentBefore" : false,
              "MyModules" : [
                {
                  "score" : -10.0,
                  "moduleName" : "MetadataProcessor",
                  "reason" : "File is a directory"
                }
              ],
              "transfer" : false,
              "reason" : "File is a directory",
              "score" : -10.0,
              "@type" : "Status"
            }
          ]
        }
      },
      {
        "_index" : "dec-test",
        "_type" : "_doc",
        "_id" : "file_2381062746398523257",
        "_score" : 1.0,
        "_source" : {
          "sourceId" : "source_4",
          "updateTime" : "2020-12-11T22:45:39.736Z",
          "@id" : "file_2381062746398523257",
          "@type" : "Trace",
          "propertyBundle" : [
            {
              "sizeInBytes" : 152,
              "entropy" : 4.398,
              "dataPayloadReferenceURL" : "http://10.14.12.192:80/api/data/device_768ea3d75dc36f11_637429452675373009/files/2381062746398523257/contents",
              "hash" : [
                {
                  "hashValue" : "6EB3AF0412840D24FA267171AC22A3B9",
                  "hashMethod" : "MD5"
                }
              ],
              "@type" : "ContentData"
            },
            {
              "accessedTime" : "2016-03-15T12:28:51Z",
              "modifiedTime" : "2016-03-15T12:28:51Z",
              "sizeInBytes" : 152,
              "extension" : "authtokcont",
              "fileName" : "00000000.authtokcont",
              "filePath" : "00000000.authtokcont",
              "@type" : "File"
            },
            {
              "fileType" : "unknown",
              "fileTypeName" : "Unidentified",
              "disposition" : "Overt",
              "diskOffset" : 25231360,
              "hits" : [ ],
              "@type" : "MyType",
              "@parentId" : "partition_2381062746393984481"
            },
            {
              "sentBefore" : false,
              "MyModules" : [
                {
                  "score" : -5.0,
                  "moduleName" : "MetadataProcessor",
                  "reason" : "File score based on uniqueness,File type is unknown"
                }
              ],
              "transfer" : false,
              "reason" : "File score based on uniqueness,File type is unknown",
              "score" : -5.0,
              "@type" : "Status"
            }
          ]
        }
      }
    ]
  }
}
AntonShuvaev commented 3 years ago

Fixed in 0.5.1.

chirag4semandex commented 3 years ago

Just wanted to update you with the latest version, its actually breaking some good responses as well. Here is an error that I am getting

Capture

chirag4semandex commented 3 years ago

Confirmed 0.6.0 fixes the issue.