Hello everyone!
I am fairly new to Algolia and so far loving the experience. But I stucked with a problem, and simple googling and toggling Index Configuration did not help.
Example of my data:
{
objectID: "asd-asd-asd"
_type: "page",
title: "fruits",
modules: [
{
_id: "1",
title: "mango",
_type: "mango_module"
description: "sweet and tasty",
text: "long text"
},
{
_id: "2",
title: "apple",
_type: "apple_module",
description: "round",
text: "long text"
},
// ...
]
}
Imagine, that search query is āappleā. Result object must be:
{
objectID: "asd-asd-asd"
_type: "page",
title: "fruits",
modules: [
{
_id: "2",
_type: "apple_module"
title: "apple",
description: "round",
text: "long text"
}
]
}
Response object should return āpageā object, but filter out all values from āmodulesā array which did not āhitā the search query. If search query is ālong textā, modules array must contain both āappleā and āmangoā, because they both have text: "long text"
It also would be great, if there is a hit on āpageā string property, to return all modules without filtering, but itās not crusial, I think.
I would appreciate any help, and answer every question! Thanks to everyone in advance!