Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 08-21-2014 04:35 AM - edited 09-16-2022 02:05 AM
I'm having trouble extracting a nested structure from my avro data.
_attachment_body=[
{
"username" : "alex"
"date" : "21-08-2014"
"attachments" : [
"documents" : [
{
"title": "test"
"tags" : [ "a", "b", "c" ]
},
{
"optional1" : "test2"
"title" : "test2"
} ],
"context" : "school"
]
}
Extracting the paths with Avro:
...
{ extractAvroPaths {
flatten : true
paths : {
/my_user : /username # this works fine
# all three of these result in the same error message, with different patemeters
/my_attachments : /attachments[]
/my_documents : /attachments[]/documents[]
/my_contexts : /attachments[]/documents[]/context
}
}
}
Results in the following error message:
com.typesafe.config.ConfigExceptionWrongType: morph-solr.conf: 30: Cannot concatenate object or list with a non-object-or-list, ConfigString("/my_attachments") and SimpleConfigList([]) are not compatible.
Eventualy I would like to map the fields to a solr index. So if its possible to extract the nested structures, the followup question would be how to map those to a solr schema, but lets take it one step at a time 🙂
Created 08-21-2014 05:31 AM
Srry too quick on the post trigger: this was just a matter of quoting the mapping:
/my_attachments : "/attachments[]"
The question remains how to map the structure to a solr index, but will post that in the appropriate section.
Created 08-21-2014 05:31 AM
Srry too quick on the post trigger: this was just a matter of quoting the mapping:
/my_attachments : "/attachments[]"
The question remains how to map the structure to a solr index, but will post that in the appropriate section.
Created 08-21-2014 06:20 AM