Hello all. New to TypeSense, still figuring out th...
# community-help
p
Hello all. New to TypeSense, still figuring out the API. Currently having an issue with documents import erroring out due to
Field 'cpvIndex' must be an int32.
This field (and others) can be
null
. My schema looks as follows:
Copy code
fields: [
  {name: '.*', type: 'auto', optional: true},
  {
     name: 'cpvIndex',
     type: 'int32',
     facet: false,
     optional: true, // <-- should allow null vals?
  },
  ...
k
👋 does this error happen when you send a null value as an integer?
This might be a bug, I'll look. For now, you could remove the null values from the object before sending to Typesense.
p
error seems to happen when the value for this field is
null
when i remove the
null
key vals from the document, i'm getting
Field cpvIndex has been declared in the schema, but is not found in the document.
can't really set them to
0
since this would be incorrect data for us 😞
k
No I mean just remove the key from the json dictionary.
Oh got it, let me look
p
thanks!
k
May I know what version of Typesense you are using?
p
Typesense v0.23.0.rc21
(Jason bumped me up, to allow string-based sort)
k
@Peter Morawiec I'm able to send null values for an integer, see this quick example that works for me locally: https://gist.github.com/kishorenc/916f2988e39f48dc51893e58011c7c72
🤔 1
On your cluster, can you hit the
/collections
end-point and check the exact schema that Typesense has stored for this collection?
p
yes, it looks correct
Copy code
"facet": false,
      "index": true,
      "name": "cpvIndex",
      "optional": true,
      "type": "int32"
k
Did you try indexing a single document from the curl like in the example above just to be sure?
p
not yet, will try in a bit
k
Ok, let me know once you have had a chance to try that out and I will be happy to debug further based on that.