Issues with Field Types in Nested Schema
TLDR Emma reported an issue with nested field types showing incorrect behavior in both 0.25.0rc34 and rc54. Kishore Nallan asked them to create a Github issue to track the problem and also suggested setting a specific property for indexing Mandarin.
Aug 05, 2023 (4 months ago)
Emma
01:31 AM{
"name": "anime:production@42069",
"enable_nested_fields": true,
"fields": [
{
"name": "titles",
"type": "object"
},
{
"name": "titles\\..*",
"type": "string"
},
{
"name": "start_date",
"type": "object"
},
{
"name": "start_date\\..*",
"type": "int32",
"facet": true,
"optional": true
}
]
}
I attempt to insert the following:
{
"titles": {
"zh-cn": "我的英雄学院"
},
"id": "420",
"start_date": {
"year": 2020,
"month": 2,
"day": 3
}
}
And get the following error:
{
"message": "Field `titles.zh-cn` must be an int32."
}
Even though I clearly defined
titles\..*
to be string
:thinking_face:Emma
01:35 AMstart_date
and start_date\..*
resolves it, even though they definitely do not match the fieldKishore Nallan
01:41 AMEmma
01:41 AMKishore Nallan
01:44 AMlocale
property of the field to zh
Emma
01:45 AM.*\.zh.*
which define locales, but I reduced this testcase and happened to choose the mandarin field when doing so 😅 Still happens even with english, I’ll change that in the github issueKishore Nallan
01:48 AMEmma
01:49 AMEmma
01:50 AMstart_date
field alone is fine, it’s the start_date\..*
field which breaks itKishore Nallan
01:53 AMEmma
03:12 AMday
month
and year
fields explicitly, thankfully that works for my use case 😅Typesense
Indexed 3015 threads (79% resolved)
Similar Threads
Accessing Nested Objects Using `query_by` in Typesense
Emma wanted to query nested objects using `query_by`. Kishore Nallan suggested using `title.*` pattern and ensuring `enable_nested_fields` is set to true.
Trouble in Implementing Deeply Nested Search
Anirudh is struggling to implement a two-level nested search. Jason asked for some specific examples to study the issue. Anirudh provided some material, realizing that adding top fields helped but might over-index. Jason then suggested reporting this issue on GitHub.
Resolving Multilingual Search Function in Typesense Software
Bill is having difficulty with multilingual search functionality in Typesense software. Developer Kishore Nallan suggested setting a language locale and provided a demo build. The build solution had some issues, and after multiple rounds of software updates and troubleshooting, the problem still persists.
Cold Start Problem with Dynamic Collections
Adrian reported cold start issues with dynamic collections. Jason suggested using wildcard `*` for query_by parameters, upgrading to `0.25.0.rc34`, and clarified conventions. Adrian's issues were resolved but they reported a limitation that will potentially be addressed.
Issue with `included_fields` Command in Typesense
SamHendley encountered an issue with the `included_fields` command in Typesense versions 0.23.0 and 0.24.0.rc17. Jason helped identify it as a bug in the 0.24.X version, which was later addressed in release 0.24.0.rcn19.