MongoDB String to Double conversion during aggregation pipeline -


In my documents, decimal values ​​are stored as strings (converted to string due to my BigDCam in Java) . It's absolutely right and necessary when I'm looking at a document at a time. However, I regard them as double during the proper purpose (for example, $ sum).

Is there any way that I can repeat the string during $ Project Operations (or otherwise) during my gathering pipeline? That's because my continuous pipeline will sum $ over double field.

I do not consider the option of storing them as double, because I will need to keep the base of the document accurate, but I'm fine if the accuracy is lost during the operation.

There is no operator to convert to aggregation pipelines. Is it possible to store two different values ​​in the form of BigDisk / String and the other as double / float value? This can be a quick and dirty option if you are okay to ignore the inequality due to temporary point values.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -