Fix deserialization of (typed-table) similarity when reading rows#151
Fix deserialization of (typed-table) similarity when reading rows#151
Conversation
…w, even if ColumnIgnore
|
@stephenatsembit Please, would you take a look? I'm not 100% confident mine is the right approach. |
|
Is this supposed to be using |
Good question, @toptobes . But on closer inspection the answer seems, somewhat surprisingly, yes, judging from the way that attribute is verified within the Which perhaps calls for an agnostic renaming of Or, even better, creation of a separate attribute for tables (there's no such thing that I could find). I'm keeping on hold but if you agree I can do the split in this PR. |
|
I wouldn't mind separate |
The "$similarity" field, which correctly carries a
JsonIgnoreattribute for a typed table, fails to be deserialized into the field when a table is read (even for a vector search with includeSimilarity=true).This PR changes the condition for reading fields, adding an exception to the JsonIgnore rule for this case.
A test that would fail on current main and now passes is as follows:
Note that the vector search must be done with a vector (and not a vectorize string) because, due to a still-open Data API issue, in the latter case the $similarity field does not get returned.