I have nodes with data properties with unicode (Chinese/Japanese) characters
such as:
{"uid" => "12345", "name" => "例子"}
I index such nodes with their id, so that by doing this (where users_index
is the index, uid is the key, 12345 is the value):
GET to /index/node/users_index/uid/12345
I can get back the right result:
{"indexed"=>"
http://localhost:7474/db/data/index/node/users_node/uid/12345/6638",
"outgoing_relationships"=>"
http://localhost:7474/db/data/node/6638/relationships/out",
* "data"=>{"uid"=>"12345", "name"=>"例子"}, *
"traverse"=>"http://localhost:7474/db/data/node/6638/traverse/{returnType}
",
"all_typed_relationships"=>"
http://localhost:7474/db/data/node/6638/relationships/all/{-list|&|types}",
"property"=>"http://localhost:7474/db/data/node/6638/properties/{key}",
"self"=>"http://localhost:7474/db/data/node/6638", "properties"=>"
http://localhost:7474/db/data/node/6638/properties",
"outgoing_typed_relationships"=>"
http://localhost:7474/db/data/node/6638/relationships/out/{-list|&|types}",
"incoming_relationships"=>"
http://localhost:7474/db/data/node/6638/relationships/in", "extensions"=>{},
"create_relationship"=>"
http://localhost:7474/db/data/node/6638/relationships", "paged_traverse"=>"
http://localhost:7474/db/data/node/6638/paged/traverse/{returnType}{?pageSize,leaseTime}",
"all_relationships"=>"
http://localhost:7474/db/data/node/6638/relationships/all",
"incoming_typed_relationships"=>"
http://localhost:7474/db/data/node/6638/relationships/in/{-list|&|types}"}
However, if I do the same search query as a part of a bulk REST request:
POST to /batch:
[{"method" => "GET",
"to" => "/index/node/users_index/uid/12345",
"body" => {},
"id" => 0}]
Returns the node in the body, however, with bad characters in the data
field:
[{"id"=>0, "body"=>[{"indexed"=>"
http://localhost:7474/db/data/index/node/users_node/uid/12345/6638",
"outgoing_relationships"=>"
http://localhost:7474/db/data/node/6638/relationships/out",
*"data"=>{"uid"=>"12345", "name"=>"¥ᄂᄃ¥ツᄏ\uFFE7モワ"}, *
"traverse"=>"http://localhost:7474/db/data/node/6638/traverse/{returnType}",
"all_typed_relationships"=>"
http://localhost:7474/db/data/node/6638/relationships/all/{-list|&|types}",
"property"=>"http://localhost:7474/db/data/node/6638/properties/{key}",
"self"=>"http://localhost:7474/db/data/node/6638", "properties"=>"
http://localhost:7474/db/data/node/6638/properties",
"outgoing_typed_relationships"=>"
http://localhost:7474/db/data/node/6638/relationships/out/{-list|&|types}",
"incoming_relationships"=>"
http://localhost:7474/db/data/node/6638/relationships/in", "extensions"=>{},
"create_relationship"=>"
http://localhost:7474/db/data/node/6638/relationships", "paged_traverse"=>"
http://localhost:7474/db/data/node/6638/paged/traverse/{returnType}{?pageSize,leaseTime}",
"all_relationships"=>"
http://localhost:7474/db/data/node/6638/relationships/all",
"incoming_typed_relationships"=>"
http://localhost:7474/db/data/node/6638/relationships/in/{-list|&|types}
"}],
"from"=>"/index/node/users_node/uid/12345"}]
Do you think if this is a bug or is there anything I can change to make the
bulk request return the correct Chinese/Japanese characters? I can reproduce
this all the time.
Thanks,
Nuo
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user