Git Product home page Git Product logo

Comments (2)

kishorenc avatar kishorenc commented on May 29, 2024

@abiudmani

I just tried an example but it seems to work for me. See here: https://gist.github.com/kishorenc/6529cd9d48fc4be960dd158d43cc1f18

Can you post a similar example with exact schema and the document being inserted?

from typesense.

abiudmani avatar abiudmani commented on May 29, 2024

Hi @kishorenc, Thanks for the response. I think, I got the issue now.

When you have declared the object, you have declared as follows,
{"name": "name", "type": "object"},
but when I declared the same for an array object, I declared as follows,
{"facet":false,"index":false,"infix":false,"locale":"","name":"oDS","optional":true,"sort":false,"stem":false,"type":"object[]"}

since the index is false and the optional field type as true, I'm facing this issue.
When we declare the object / object[] types, is the index type has to be set to true (i.e default value)?

The schema, document & error I faced are as follows:
Scheme:
"fields":[
{"facet":false,"index":false,"infix":false,"locale":"","name":"oDS","optional":true,"sort":false,"stem":false,"type":"object[]"},{"facet":true,"index":true,"infix":false,"locale":"","name":"oDS.delState","optional":false,"sort":false,"stem":false,"type":"string[]"},{"facet":false,"index":true,"infix":false,"locale":"","name":"oDS.delStateValue","optional":false,"sort":false,"stem":false,"type":"int32[]"}]

Document:
{"id":"1","oDS":[{"delState":"In Progress","delStateValue":1}]}

Error:
{"code":400,"document":"{"id":"1","oDS":[{"delState":"In Progress","delStateValue":1}]}","error":"Field oDS.delStateValue has been declared in the schema, but is not found in the document.","success":false}

from typesense.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.