Now let’s say I want to search by bar.name when retrieving records. Is that possible? I don’t see any documentation for these things. Also is the querying case-sensitive? I tested it out on a few and it appears you have to type exact names in order for it to return results.
Now let’s say I want to search by bar.name when retrieving records. Is that possible?
When it comes to metadata, it must be at the top level to be accessible from filter expressions. In other words, it cannot be nested. This is a limitation we would like to eventually overcome.
Also is the querying case-sensitive?
Yes. Filter expressions are strict boolean predicates.
If you’re looking for fuzzy semantic matching on names, you can consider structuring your document like this instead:
{
"documentId": "doc-id-001",
"title": "A list of names",
"section": [
{
"metadataJson": "{\"class\": \"foo\"}",
"text": "Moamer El Kazzafi"
},
{
"metadataJson": "{\"class\": \"bar\"}",
"text": "Srinivasa Ramanujan Aiyangar"
}
]
}
Produces a fuzzy match as you intend. This even works, to an extent, across different languages! You can mix the search with a filter based on class (either foo or bar, per your example).
I hope this helps. Let me know if you have any more questions.