FTS with child-object/sub-document result

Hey guys, currently I’m a bit frustrated because my search doesn’t work the way i want or the way i tried. Maybe you know how I get the needed result.

Sample Doc:

 {
 	"docID": "b4465a10-58f6-11ea-82bc-153386aea6c0",
 	"docType": "dataset",
 	"animals": [{
			"type": "dog",
 			"name": "sam",
 			"color": "black"
 		},
 		{
 			"type": "cat",
 			"name": "lucy",
 			"color": "black"
 		}, {
 			"type": "dog",
			"name": "charly",
			"color": "blue"
 		}
 	]
 }

If I search something like “+animals.type: dog +animals.color:bl*”, I only want the result:

[{
		"type": "dog",
		"name": "sam",
		"color": "black"
	},
	{
		"type": "dog",
		"name": "charly",
		"color": "blue"
	}
]

Is that possible? Thanks in advance!

@Maroubra FTS returns document IDs for the search terms. So while searching across an array of JSON objects within a document it would look for the searched terms - in your case within fields: animals.type and animals.color.
The terms in these fields for the document are flattened out…

"animals.type": ["dog", "cat", "dog"]
"animals.color": ["black", "black", "blue"]

Unfortunately, as of today FTS will return results for your search terms that are present in the fields indexed and not necessarily within the same nested object within the array.

I believe we do have a ticket for this on our roadmap, although I can’t promise you at the moment on when we’ll make builds available with it.