GithubHelp home page GithubHelp logo

Comments (5)

rwynn avatar rwynn commented on July 3, 2024 1

I tried both insert and update using $set. But in both cases the null was delivered for me.

I'll take a look at the repo though when you get a chance.

from monstache.

rwynn avatar rwynn commented on July 3, 2024

Hi @meabed ,

I wasn't able to replicate this issue with the code in the rel6 branch. What version of monstache are you using? Are you able to give minimal steps to replicate?

This is what I am seeing in the logs when I set things to null in MongoDB...

INFO 2023/12/22 14:12:29 Started monstache version 6.7.17
INFO 2023/12/22 14:12:29 Go version go1.20.3
INFO 2023/12/22 14:12:29 MongoDB go driver v1.13.1
INFO 2023/12/22 14:12:29 Elasticsearch go driver 7.0.31
INFO 2023/12/22 14:12:29 Successfully connected to MongoDB version 6.0.12
INFO 2023/12/22 14:12:29 Successfully connected to Elasticsearch version 8.11.3
INFO 2023/12/22 14:12:29 Listening for events
INFO 2023/12/22 14:12:29 Sending systemd READY=1
WARN 2023/12/22 14:12:29 Systemd notification not supported (i.e. NOTIFY_SOCKET is unset)
INFO 2023/12/22 14:12:29 Watching changes on the deployment
TRACE 2023/12/22 14:12:42 POST /_bulk HTTP/1.1
Host: localhost:9200
User-Agent: elastic/7.0.31 (linux-amd64)
Content-Length: 145
Accept: application/json
Authorization: Basic ZZZ
Content-Type: application/x-ndjson
Accept-Encoding: gzip

{"update":{"_index":"test.test","_id":"6585cbfa8952c6532bf0db6c"}}
{"doc":{"a":{"zed":null},"bar":null,"foo":1,"zed":null},"doc_as_upsert":true}

TRACE 2023/12/22 14:12:42 HTTP/1.1 200 OK
Content-Length: 244
Content-Type: application/json
X-Elastic-Product: Elasticsearch

{"errors":false,"took":37,"items":[{"update":{"_index":"test.test","_id":"6585cbfa8952c6532bf0db6c","_version":7315497415933427715,"result":"updated","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":6,"_primary_term":3,"status":200}}]}

from monstache.

meabed avatar meabed commented on July 3, 2024

Thank you @rwynn im using the latest docker build 6.7.14

I will make small repo to reproduce.

It happens on updating existing document in elastic search not on new document.

from monstache.

meabed avatar meabed commented on July 3, 2024

Hi @rwynn

Thank you so much, I have tested and its working as expected.

The issue I had it was from the javascript transformation it was removing the null and unset fields :)

Thank you for your support 🙏

from monstache.

meabed avatar meabed commented on July 3, 2024

Debugging the issue - this was actually from lodash _.omit method it was removing this fields - FYI For anyone having the same issue.

from monstache.

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.