Hi Assuming I have a document like below
{
"name": "Document 1",
"fieldA": 123.45,
"fieldB": "Sample text",
"fieldC": "keyword_value",
"ValuesDocument": {
"al6gq": "true",
"63c095bebb3a6b02afcb2cbd": "ABC-369",
"ab4jh" : "anc@gmail.com",
"awb6p" : "1.2.3.4",
"afl2f" : {
"_t": "ValueSelection",
"_id": "abc",
"Value": "test string",
"v": "xyz"
}
}
}
I would like to use flattened on ValuesDocument
If I understand correctly this will put all the values of internal fields as keywords of the ValuesDocument field
If that's the case how can searching on internal fields like below be possible?
ValuesDocument.ab4jh:anc@gmail.com
Does it mean it is done as a filtering stage from _source of all matching documents? Or is it something else going on behind the scenes?
Furthermore, what happens if I'm starting to use AND operation on more than one internal fields? Does search time starts to add up because more documents needs to be checked?
Considering that flattening is done to avoid creating extra mappings I'm guessing it's one internal inverted index for terms of ValuesDocument?
Thanks