em1nos
07/10/2021, 9:22 PM[
'name' => 'attributes\.*',
'type' => 'auto',
'optional' => true,
'facet' => true
]
This seems to work fine. It indexes all the flattened attribute fields with dot-notation.
The issue is that not every document has all the attribute fields, which makes the InstantSearch fail.
Error: 404 - Could not find a facet field named `attributes.operating-system` in the schema.
Is this a bug in the InstantSearch adapter, or am I doing something wrong?Jason Bosco
07/11/2021, 12:50 AMJason Bosco
07/11/2021, 12:52 AMem1nos
07/11/2021, 8:48 AMem1nos
07/11/2021, 8:48 AMem1nos
07/11/2021, 8:49 AMem1nos
07/11/2021, 8:49 AMKishore Nallan
07/11/2021, 9:21 AMattributes\..*
Kishore Nallan
07/11/2021, 9:21 AMproduct_category\..*
em1nos
07/11/2021, 9:35 AMem1nos
07/11/2021, 9:36 AMKishore Nallan
07/11/2021, 9:39 AMattributes.
-- since the dot is a special character in regexp, we have to use a backslash to escape it, like this \.
. Then we want to match any number of characters after that, so we use .*
-- putting those two together: attributes\..*
Kishore Nallan
07/11/2021, 9:41 AMattributes_.*
em1nos
07/11/2021, 9:47 AMKishore Nallan
07/11/2021, 9:47 AM