Hi:
I have started using the scala libraries provided by the elastic4s
libraries. I am running into a problem creating a mapping that has a
straightforward definition (yet it has some complexity).
Example :
{
"index": {
"mappings": {
"OA": {
"properties": {
"AdminStatus": {
"properties": {
"content": {
"type": "string"
},
"effectiveFrom": {
"type": "date",
"format": "dateOptionalTime"
}
}
},
"IsPublicFlag": {
"type": "boolean"
},
"OrganizationAddress": {
"properties": {
"OrganizationAddressCity": {
"type": "string"
},
"OrganizationAddressCountryCode": {
"type": "string"
},
"OrganizationAddressLine1": {
"type": "string"
}
}
}
}
}
}
}
}
I am not able to figure out how to define OrganizationAddress field (which
is a "complex" object.)
if I define it as such :
indexClient.execute {
create index "index" mappings (
"OA" as (
"AdminStatus" as (
"content" typed
StringType,
"effectiveFrom" typed
DateType
),
"IsPublicFlag"
typed BooleanType,
"OrganizationAddress" as (
"OrganizationAddressCity" typed StringType,
"OrganizationAddressLine1" typed StringType,
)
) }
I get a compilation error :
Error:(52, 69) type mismatch;
found : com.sksamuel.elastic4s.mapping.MappingDefinition
required: com.sksamuel.elastic4s.mapping.TypedFieldDefinition
"AdminStatus" as (
^
How can I map complex objects using the Scala interface elastic4s ?
Thanks
Ramdev
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/10398958-4755-478f-a3f7-3f1b77aca67d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.