This message was deleted.
# community-help
s
This message was deleted.
j
Is it possible to define the fields that need to be indexed of a nested object without flatting the object?
Yup, this is possible
If you have an object like this:
{ nested: { fieldA: { fieldA1: value, fieldA2: value } } }
You can index just fieldA1 by specifying this in the schema:
{ name: nested.fieldA.fieldA1, type: string }
t
Hmm 🤔. So does the the object itself need to be in the Schema as well?
j
No, the object should not be in the schema, if you're only indexing a few fields
If it is, then that will take precedence
t
Ahh, interesting! Thanks, I will try this and report back.
👍 1
It worked thanks! Might be helpful to update the docs to explain this behavior.
👍 1
j
Will add it to the docs
👍🏽 1
t
Nice! Docs are super clear 👍🏽
🙏 1