Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-16-2019 11:19 PM
Hi, In Elasticsearch Integration
Using CALL apoc.es.query i connect to my elastic index, then I unwind the hits as hit, and access each property as
MERGE (applicationid:ApplicationID {appid: hit._source.Application_ID})
MERGE (doc)-[:HAS_ID]->(applicationid)
MERGE (applicationdate:ApplicationDate {appdate: hit._source.Application_Date})
MERGE (doc)-[:HAS_Date]->(applicationdate)
My index has nested properties like
"Application_ID" : "004968247",
"Application_Date" : "2012-11-16T00:00:00.000Z",
"Product" : null,
"Applicant" : [
{
"First_Name" : "Cameron",
"Last_Name" : "Fisher",
"Amount_Requested" : null,
}
],
"_original_Application_Date" : "16/11/2012"
To access the First_Name of the Applicant i tried
MERGE (applicantfirstname:ApplicantFirstName {appfname: hit._source.Applicant.First_Name})
MERGE (doc)-[:HAS_First_Name]->(applicantfirstname)
But i get error as
Neo.ClientError.Statement.TypeError: Type mismatch: expected a map but was List{Map{…………...
May i know how to access that
Also may i know how to get the properties with null like in the "Product" and "Amount_Requested", because i am getting error as
Neo.ClientError.Statement.SemanticError: Cannot merge node using null property value for amtreq
Thanks
09-17-2019 09:04 PM
Thanks, I figured out to UNWIND the nest again and use the alias to access each properties, the null values doesn't load.
All the sessions of the conference are now available online