Giter Site home page Giter Site logo

Timestamp fields on update about documentation HOT 3 CLOSED

virik avatar virik commented on May 26, 2024
Timestamp fields on update

from documentation.

Comments (3)

guimachiavelli avatar guimachiavelli commented on May 26, 2024

Hello @virik—thanks for getting in touch!

From your description, I assume you are using the POST endpoint of the /indexes/{index_uid}/documents route. POST is useful for adding and completely replacing documents.

When you want to partially update a document—for example, if you only want to set your updated field to a new timestamp value—use the PUT endpoint.

Does this help? If so, how did you try to find this information? Knowing that would help us making sure this information is easier to find in the future.

Also, for future reference: we're happy to get user feedback here, but if you are on a rush you can also reach out to our support staff on the Meilisearch Discord server. They tend to reply much more quickly than the documentation team.

Thanks again!

from documentation.

virik avatar virik commented on May 26, 2024

hi,

No, I'm using the PUT endpoint. Let's say we have 1 existing product and 1 new product, and a timestamp called "created". For the new product we need to set the timestamp, but for the existing product we should not change it. There should be a way to specify which fields to ignore on existing records.

from documentation.

guimachiavelli avatar guimachiavelli commented on May 26, 2024

Ah, apologies for the misunderstanding. I believe the only solution would be to make two requests: one POST request adding new products, and one PUT request updating existing products. As it stands, and if I understand your use case correctly now, I don't believe this is a documentation issue: there is no Meilisearch feature that does exactly what you need it to do.

If you get in touch with our support team on discord, they might be able to help you come up with better workarounds.

Closing this issue since the docs repo is not the best place for providing user support.

from documentation.

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.