Posts

Showing posts with the label mongodb

Which are best Latest web Technologies for my website [on hold]

Which are best Latest web Technologies for my website [on hold] I need best stack of latest technologies for my website which must be fast and can handle large database. Like front end , back end, database etc. Thanks in advance Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question. The best solution is do your research, decide your approach, write some code, come here and ask questions when your code is not working. – daddygames Jun 29 at 20:11 Thanks @daddygames for reply. Thats the problem I am not familiar with all the web technologies but I want to bui...

What is the best method to seeding a Node / MongoDB application?

What is the best method to seeding a Node / MongoDB application? So, I'm new to the MEAN stack, and I've hit a wall trying to seed MongoDB. I'm using Mongoose to communicate with the database, and there's a bunch of documentation suggesting I should be able to seed using populated JSON files. What I've tried: node-mongo-seed ; Pretty straight forward, but consistently throws errors on the end of arrays. (Perhaps the missing bson module is at fault?) { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' } js-bson: Failed to load c++ bson extension, using pure JS version Seeding files from directory /Users/Antwisted/code/wdi/MEAN/seeds ---------------------- Seeding collection locations err = [SyntaxError: /Users/Antwisted/code/wdi/MEAN/seeds/locations.json: Unexpected token {] mongoose-seed ; Also pretty straight forward, basically puts the JSON objects into a variable before exporting to the database. Promising, but... more ...

Text Search in Mongo: Look up item name that contains spaces

Text Search in Mongo: Look up item name that contains spaces I have a collection in MongoDB that looks something like this (all other fields omitted for clarity) { "name" : "Toyota Camry" }, { "name" : "Fort Taurus" }, { "name" : "Ford Fiesta" } What I want to do is to identify sentences where these items appear 'all inclusive'. For example, the texts: I need some way of querying MongoDB, so it will give me a match on Ford Fiesta but no match on Fiesta I have tried to use text index, but this seams to return everything. Ideally, the concept is "Take this line of text, and see if it contains any of the stored items in the database" EVEN BETTER: If I can get the LONGEST match (i.e. if there's a "ford fiesta" and a "ford fiesta turbo", then I'd like the latter ONLY if it's within the text. Any good ideas? Is this doable? For exact match - wrap the sear...

Runtime Error: this.userprovider.userSignup(…).subscribe is not a function in Ionic

Runtime Error: this.userprovider.userSignup(…).subscribe is not a function in Ionic Below is signup.ts I wanted to insert the data in MongoDB. I'm getting the error like this.userprovider.userSignup(...).subscribe is not a function. Please help me to solve the error import { Component } from '@angular/core'; import { IonicPage, NavController, NavParams, ViewController } from 'ionic- angular'; import { UserProvider } from '../../providers/user/user'; @IonicPage() @Component({ selector: 'page-signup', templateUrl: 'signup.html', }) export class SignupPage { private registerUrl = 'http://localhost:8080/signup'; username: string; email: string; password: string; repassword: string; constructor(public navCtrl: NavController, public navParams: NavParams, public viewCtrl: ViewController, public userprovider: UserProvider) { } signup(): void { let review = { username: this.username, email: this.email, ...

mongodb : listen() attempts to access socket in a forbidden way

mongodb : listen() attempts to access socket in a forbidden way I downloaded 64-bit zipped version of mongodb for windows, created '/data/db' as instructed. Now, when I run "mongod" command, I am getting the following error & the mongodb server shuts down automatically. "ERROR : listen() failed error-10013. An attempt was made to access socket in a way forbidden by its access permissions. " Please help me to clear the firewall settings in windows to prevent this error & run mongodb. I was able to fix the error by using the following command : "mongod --bind_ip="127.0.0.1". :) – Dharshni May 18 '14 at 10:14 Perhaps better to put your comment in an answer and accept it. It can be useful to other users. – kranteg ...

MongoDB returns nothing when placing the model in another file

MongoDB returns nothing when placing the model in another file I have a very basic server, which can be run in three ways: [BLOCK 2 ENABLED] / [BLOCK 1 DISABLED] Defining interfaces, schema and model in the same file. [BLOCK 2 ENABLED] [BLOCK 1 DISABLED] [BLOCK 1 ENABLED] / [BLOCK 2 DISABLED] Defining interfaces, schema and model in an external file: ./models/user.ts [BLOCK 1 ENABLED] [BLOCK 2 DISABLED] The content of [BLOCK 2] is exactly the same as the content of file: ./models/user.ts . [BLOCK 2] Just in case here you have the repository: https://github.com/napolev/mongodb-experiments Here is the code: ./server/server.ts [BLOCK 2 ENABLED] [BLOCK 2 ENABLED] import * as mongoose from 'mongoose'; import * as colors from 'colors'; /*/ // BLOCK 1: import { User, IUserDocument } from '../models/user'; /*/ // BLOCK 2: import { Document, Schema, Model, model} from "mongoose"; export interface IUser { username: string, password: string, e...

MongoDB.Driver C# auto expire documents

MongoDB.Driver C# auto expire documents I am inserting documents into a collection and have a field called ExpireWhen. I would like to automatically remove those documents when the date has expired. I tried looking around but was not able to find information using the mongo db driver for c# version 2.6.1 I tried the following but it doesn't seem to do anything. this.CacheItemRecords().Indexes.CreateOneAsync( Builders<CacheItemRecordEntry>.IndexKeys.Ascending(_ =>_.ExpireWhen), new CreateIndexOptions { ExpireAfter = new TimeSpan(0, 0, 0) } ); By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

GraphLookup using the id property (string compared to ObjectId) using spring data mongo

GraphLookup using the id property (string compared to ObjectId) using spring data mongo Looking for options to use the graphlookup pipeline where the from field is the string value of the Object Id and the to field is Object Id. 1 Answer 1 Still not possible. and there is no field casting available for $graphlookup By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.