I am working with Meteor JS and currently new in it. Since Meteor uses only Mongo DB, I need to integrate Solr with it for faster search access. Googled but to no avail. Can anyone please share with me some methods, links, or code snippets where I can use Solr with my Meteor project.
Try with Lunr package.
First install it on meteor
meteor add lbee:lunr
According to docs.
A bit like Solr, but much smaller and not as bright.
Here is the live demo, and API
Also you might look at this conversation on Quora about Text-Search and this other too
PD: Example code on the Lunr Package info on Atmosphere
Related
I want to create a web in node js with the using the "Sails.js" framework and "CouchDB" database. I have check its package and I found lots of package for that.
https://www.npmjs.com/search?q=couchdb
So any one can suggest which package I can used for my application and also want to know for this I need to create a custom adapter.
If there has no requirement of create a custom adapter, so can I use the sails module feature.
The most popular CouchDB adapter in JS :
PouchDB
nanoDB
They are both available on NPM.
PouchDB has a lot of features and his API is easy to use. It also supports a lot of return types (callbacks,promises, async/await). There's also a lot of plugins around PouchDB.
As for nanoDB, it has less features(since it`s minimalist) but it covers all the general features of CouchDB.
Note: nanoDB normal implementation is with callbacks(which can be very ugly). There is an implementation of nanoDB with promises here.
You can take a look also to this adapter sails-couchdb-orm, but it could be no longer maintained. If you plan deploying your project using IBM Bluemix, you should try using sails-cloudant-orm. Cloudant is based on Apache CouchDB.
I'm trying to develop an application in phonegap/ionic and I want to use a remote database to store my data. I want to use MongoDB.
I already tried lots of ways such as this quick start guide.
By using this I can connect to DB but this is pure node.js and the require() function cannot be recognized when I try to add this code to an ionic starter app. Maybe require is not supported in ionic
Is there a way that can achieve it in Ionic?
Please let me know if you want some more information.
The thing is; you can't connect Ionic to MongoDB directly. No, there's not workaround, no magic involved, it's just not the way this is supposed to work. Ionic works on top of Angular and Angular is a frontend framework.
However, the way you should do it is that you basically create a (RESTful) API on your server side.
Most likely this will be made with Node.js which will talk directly to MongoDB and query it. A framework very well suited for this (you actually may be using it already) is Express.
After you write your (RESTful) API then you can consume it through your services in Angular by using Angular's $resource object.
Sure, this is not a step by step answer, and it seems you're just starting in this area, so you have some learning do to on your part (REST, RESTful, $resource, services...), but I wish you good luck and if you'll have any more specific questions, don't hesitate to ask them.
I am getting started with writing an API for a project and the tutorial I am following suggests I sign up for a hosted solution. I think that is ridiculous. My project is simple and I do not feel the need to be locked in to a service. If it helps, I am using Express.
Mongoose is a node.js module (library) which is used to interact with a database, called MongoDB.
There are some websites like mongolab.com which offer plans for development for free, so you would jsut need to sign up and you will get a database without installink anything in your computer/server etc. This is why they say it is easier.
You can install MongoDB in your local computer to test (I think most of us have it) and use just that one for developing and testing.
To install MongoDB it all depends which Operating System you are using at the moment. But you can look up on google: "Install MongoDB MacOSX/Window/Ubuntu/etc.." and normally is just one simple command. To connect to it in your local you don't need a user or anything I guess.
I just found out about sails.js and i think it's really awesome. I want to build apps with sails and angular, but i haven't found any guides on doing this. I found this site which is supposed to have a talk on using sails.js instead on express in the mean stack, but there's not video there.
I would be glad for links to videos or blog posts on how to do this.
Thanks all.
This is getting downvoted because its not a direct question about code.
I have a boilerplate sailsjs app that you can use to model your own off of..
https://github.com/mikedevita/sailsjs-v10-angularjs-requirejs-boilerplate
This is based on v0.10 which is in beta right now, but the same concept applies.
I've created a simple yet powerful angular service, published as a bower component: https://github.com/diegopamio/angular-sails-bind
It basically:
Creates the model inside the $scope for you.
Retrieves the model data from the backend using socket.
Watches for changes made by the user in the UI and updates the backend immediately.
Watches for changes made in the backend and updates the UI immediately.
And it does it with just one line of code in your angular app, like this: $sailsBind("", $scope);
I made it as part of a personal project and then I decided to publish it as it could benefit others. It works with sails 0.10. Let me know if it suits your needs or if you'd like to see something else on it.
I've built a static website generator which more or less converts markdown documents to html pages. Documents can have tags, which are useful for discovering related documents - and thus is the requirement for a query engine.
Right now I'm using MongoDB but as the application is coded in Node.js and due to the extreme lack of MongoDB support on Node.js hosts (so far no.de is the only one that I know of which supports mongodb), as well as a static website generator having absolutely no need for data persistence, I'd like to remove MongoDB and just keep the query engine.
Are there any MongoDB/NoSQL like query engines coded natively in Node.js/javascript? Or is there a better solution I haven't thought of yet... :S
Thanks guys.
Edit: If there is no such thing, who would like to build it with me? Post a comment if so :)
I'd check out JSONSelect which uses css selectors for querying js objects
Created my own in Coffee-Script for use on the Server-Side with Node.js and Client-Side with Web-Browsers.
It supports all the same queries as MongoDb. Find it here:
https://github.com/bevry/query-engine
RavenDB has a REST API and jQuery plugin available.
For example see http://andreasohlund.net/2011/02/19/accessing-ravendb-using-jsonp/
Take a look at libgit2 which is a C library for git and also the gitteh module for node.js This will give you a node wrapper around a git library - now you can have a local git repo that saves a versioned copy of your static files and serves it up via node.js. What more could you ask for? Plus push pull from github no problem - it knows the git protocols.
I haven't built this myself but happy to help if you want to do this