Status: Patch Available
Affects Version/s: 4.7, 4.8
Fix Version/s: None
After upgrading from 4.5.1 to 4.7+, a schema including a "*" dynamic field as text gets a cast exception when using a sort function and result grouping.
Repro (with example config):
- Add "*" dynamic field as a TextField, eg:
- Create sharded collection
- Add example docs (query must have some results)
- Submit query which sorts on a function result and uses result grouping:
Source exception from log:
It looks like serializeSearchGroup is matching the sort expression as the "*" dynamic field, which is a TextField in the repro.