Let's imagine document with localisations like this:
{
"Id":"product/1",
"CategoryId":"categories/1",
"Translations":[
{ "Lang": "en", "Title:"en title"},
{ "Lang": "hr", "Title:"hr title"}
]
}
and I want to get from Raven projected/flattened/filtered results that looks like this, if I query for index CategoryId:"categories/1" AND Lang:"en":
{
"Id":"product/1",
"CategoryId":"categories/1",
"Lang":"en",
"Title":"en title"
}
so basically, document contains localized strings in array, and I want to get only one language. Filtering on client is not a problem, but how to do it on raven server, with Transformer?
Or, can you suggest some other document structure for storing localised content? Currently, I have separate documents Product and ProductTranslation (for every language), but would like to have it all under one doc (looks more OO:/)