Does Pymongo have validation rules built in?

I am trying to validate an inserted document against a schema, and was trying to find a way to validate the inserted document. There are libraries like MongoEngine that say they do the work, but is there a way to do document validation directly via...
more »

2017-10-04 17:10 (1) Answers

Deleting a record using Mongoose with Redux

I want to delete a record in my mongoDB, when a user presses a button for the given record. For reference: I have all my mongoose and redux code set up, but i get this error: This is my action: //deletes a survey when user clicks button expor...
more »

2017-10-03 13:10 (2) Answers

Node.js REST API to fetch data from MongoDB

I'm trying to create a REST API using Node.js that would fetch the last N rows of a MongoDB collection. This is my current code: var express = require("express"); var app = express(); var bodyParser = require("body-parser"); var r...
more »

2017-09-29 20:09 (2) Answers

Read large mongodb data

I have a java application that needs to read a large amount of data from MongoDB 3.2 and transfer it to Hadoop. This batch application is run every 4 hours 6 times a day. Data Specifications: Documents: 80000 at a time (every 4 hours) Size : 3gb ...
more »

2017-09-28 11:09 (1) Answers

Send Json response using Jersey from MongoDb

I have the following code. I want to return all documents present in catalog as a json response. I am able to print all documents using DBCursor. @Path("/allmusic") public class GetAllMusic { @Produces(MediaType.APPLICATION_JSON) @GET p...
more »

2017-09-27 17:09 (2) Answers

MongoDB sort by "starts with"

I have a list of data in Mongo that I need to sort based on a user's inputted value. For example, I have the following data: Los Angeles, CA East Los Angeles, CA West Los Angeles, CA North Los Angeles, CA South Los Angeles, CA I want to return al...
more »

2017-09-25 19:09 (2) Answers

Laravel 5.4 and Mongodb 3.2 Configuration Issue

we are facing isssue in configuring Laravel 5.4 with Mongodb 3.2. We have done follow things but still we are facing issue in this project, it would be great if i will get solution for this Installed Composer & Install Laravel 5.4 Install Pac...
more »

2017-09-25 15:09 (0) Answers

How to search the text between the HTML tags

I'm using mongoJS to process my database query. I came across an issue which the string contains HTML tags, I'm using regex expressions to search my string in the collection. How to search the text by ignore the HTML tags? var userInput = $scope.use...
more »

2017-09-23 06:09 (3) Answers

MongoDB Java own Codecs not working

I trying to saving/getting documents from MongoDB using own .class I created own Codec and everything works fine except decoding I've spend a lot of time recreating, searching solution but still I didnt get reason why its not working :/ Test method...
more »

2017-09-21 21:09 (0) Answers

Session storage in Symfony with Mongodb

I started to work in a Symfony project and we use mongodb for session storage. In the code there are not call to save session, but in production we have a mongodb database of 150MB which in my opinion is so bigger. The problem is that expires query a...
more »

2017-09-19 15:09 (0) Answers

REST API - Which Authentication is better?

I'm creating an API and I'm not sure which authentication scheme is better to use. The main goal is very simple: - Let the users to register and give them API credentials for subsequent requests. - The users can get/refresh the API credentials from ...
more »

2017-09-14 17:09 (0) Answers

update operation cache and persist out of sync

I have person repository with the basic operation: Add, Get, Update. I am using Redis cache and MongoDB Persist. When there is update person request: 1. I update cache (if key not exists, It will be added) 2. I update Mongo. But what happened is ...
more »

2017-09-06 14:09 (1) Answers

React Meteor, reactive prop and inner state

I have a component import React, { Component } from 'react' import { EditorState, convertToRaw } from 'draft-js' import { Editor } from 'react-draft-wysiwyg' import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css' import draftToHtml from 'draftjs...
more »

2017-09-05 16:09 (1) Answers

REST API using POST showing blank response

While working on REST API, I am using POST method to fetch data from Mongo DB using @FormParam annotation. When I use GET type, then it returns the response in JSON and while changing the method from GET to POST, I am getting blank response. The code...
more »

2017-09-05 07:09 (1) Answers

Map generic list to MongoDB using Morphia

I want to map generic object that contains generic list to MongoDB using MongoDB Java driver (v3.4.2) and Morphia (v 1.3.2), like this: public class KPI<T> { public ArrayList<T> kpiList; } I used Morphia morphia = new Morphia(); ...
more »

2017-09-04 11:09 (1) Answers

hardening mongo with ufw

because of mongo hacks I'm trying to setup a firewall with ufw status shows :27017 is disabled: # ufw status Status: active To Action From -- ------ ---- 22 LIMIT ...
more »

2017-08-24 07:08 (0) Answers