Split out of #224 planning.
Problem
Array-field detection depends entirely on FieldInfo.Type being populated. NewParser fills it by reflection, but NewSQLDriver and NewDynamoDBDriver are exported and trust the caller.
A caller that hand-builds []FieldInfo and omits Type (or sets a type that is not the real field type) gets every array check silently returning false. The field falls back to scalar equality — which is exactly the bug #224 fixes — with no error to explain it.
This is not hypothetical: the existing test files in storage/search/lucene hand-build FieldInfo values throughout.
Suggested fix
Reject a FieldInfo with a nil Type at driver construction, so the mistake surfaces far from the query with an error naming the offending field.
Why deferred
Breaking change for existing callers passing incomplete FieldInfo values. Deliberately deferred out of the #224 PR rather than overlooked.
Split out of #224 planning.
Problem
Array-field detection depends entirely on
FieldInfo.Typebeing populated.NewParserfills it by reflection, butNewSQLDriverandNewDynamoDBDriverare exported and trust the caller.A caller that hand-builds
[]FieldInfoand omitsType(or sets a type that is not the real field type) gets every array check silently returning false. The field falls back to scalar equality — which is exactly the bug #224 fixes — with no error to explain it.This is not hypothetical: the existing test files in
storage/search/lucenehand-buildFieldInfovalues throughout.Suggested fix
Reject a
FieldInfowith a nilTypeat driver construction, so the mistake surfaces far from the query with an error naming the offending field.Why deferred
Breaking change for existing callers passing incomplete
FieldInfovalues. Deliberately deferred out of the #224 PR rather than overlooked.