How does mongoDB stitch compares with Parse Server and firebase? - mongodb

Im looking for a complete backend solution but I haven't been able to find information on how does mongoDB Stitch compares to other alternatives. In general I feel like I like the product but I worry about the long term support.

Related

how to push firestore data to algolia Swift

I've been doing research for the last several hours finding out how to do full text search in iOS apps with Firestore. I eventually realized full-text search is not supported. I read up on Algolia, watched tutorials, read articles and still don't see a way to push data from Firestore to Algolia in Swift. Can somebody guide me to a post or maybe add like a code snippet or something to show me how I can use this software? Thanks.
Algolia offers SWIFT API client
Swift API client is an open source, production-ready API wrapper that abstracts from the complexity of directly interfacing with the Algolia Search API
Basically to work with algolia using any API client, you have to do few things,
Install the algolia client
https://www.algolia.com/doc/api-client/getting-started/install/swift/?client=swift
Initialize the client with your application ID and KEY
https://www.algolia.com/doc/api-client/getting-started/instantiate-client-index/
Indexing your data & Setup searchable attributes
https://www.algolia.com/doc/api-client/methods/indexing/
https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/
Perform search
https://www.algolia.com/doc/api-reference/api-methods/search/
Many sub-actions available within these to improve your experience with Algolia. I recommend you to go through the docs fully.
Yes, there are few other ways available to work with algolia, like using cloud functions for indexing data into algolia and doing only search from your client. But as you specifically mentioned SWIFT the above references would help you to get started!

Indexing tweets from mongodb to Elasticsearch

i have been working on a monitoring platform using logstash elasticsearch and kibana, the idea is to stream tweets and have a real time dashboard, everything here works just fine, now i want to store the tweets on mongodb and index them with elasticsearch, i've already done the first step of storing tweets, configuring mongodb as the output of logstash, but i can't seem to find a way to index this data with elasticsearch, i've looked for so many tutorials but i could't find a solution, if someone can help i would be really gratefull
Basically you need to:
Create an elastic search index
Read your tweets from mongodb
Index the tweets in elastic search
I'm guessing you already know how to do no. 2. For no. 1 you can either use the REST API, or any number of APIs available, depending on what the rest of your app is written in or what you are comfortable with.
For no. 3 is the same thing.
I'm using the Javascript API with this package.

firebase queries and swift

I have a string for eg: "My name is John" stored in Firebase.
How would I query firebase so I can find all the posts in Firebase that have "John" ?
I can search for the first term in a string now using:
DataService.dataService.BASE_REF.child("Posts").child(selectedComment.commentKey).queryOrderedByChild("userComment").queryStartingAtValue(comment).queryEndingAtValue(comment+"\u{F8FF}").observeSingleEventOfType(.Value, withBlock: { (snapshot) in
where comment = "My"
I read about using Elastic search with Firebase but wanted to check if there was an easier way in Firebase before I looked at ElasticSearch/Flashlight for Firebase,
Unfortunately, Firebase doesn't support searching thru content like that (in any language SDK). From a Google Groups Post in July '16:
As a company that understands search, we're also a company that
understands using the best tool for the job. For fuzzy matching and
contains, a NoSQL, realtime data store isn't the correct tool--these
queries would be slow and scale poorly. BigQuery or ElasticSearch are
the right tool for providing useful results in a scalable and robust
manner.
Right now, this involves deploying a small node script to sync your
search results with the realtime data, as explained in the article
with the sample Flashlight lib. In the future, it will become more
"effortless" as we add integrations between Firebase and Cloud
products, particularly Cloud Functions and BigQuery interoperability.
BigQuery is, as I understand it, not specifically designed for user-facing search.
Elasticsearch (specifically, the Firebase plugin Flashlight) is a potential solution, but as you alluded to, it's an incredible amount of overhead (deploying/managing or renting an ES cluster, configuring the plugin, etc.). If content search is an important enough part of your app to justify that time/$, you may want to consider solutions beyond Firebase for your database needs, as it's by far one of the service's weakest areas.
In my opinion, you have a few options beyond Flashlight:
Algolia, a Search-as-a-service provider, does offer integration with Firebase, but I've never used it & so can't offer much more than to say that it exists.
Another alternative might be maintaining a collection of documents you want to search on another service, like AWS Cloud Search
Depending on the stage of your project & your needs, consider other Backends-as-a-Service that support more in terms of querying. E.g., GraphQL-as-a-service backends, like Scaphold.io, Graph.cool, and Reindex are all built on SQL databases, and (I believe) all support multiple types of querying.

Best way to share collection with customer

Recently we are working with a customer who want's one of our mongodb collection to be shared with them. I'm pretty new to Dev/Sys Ops so I'm wondering what would be the best way to share collection with them?
Client needs to be able to specify dates and then pull all of the data in that range from collection (so some sort of query is needed).
I was considering giving them access to mongo through ssh, but would that be secure and appropiate?
Second thing I consider was by creating some simple webapp and then sending it over as POST
Thoughts? Cheers
Posting my comment as an answer after a small discussion with OP
A simple REST API should suffice - sending the search criteria to your API, then querying MongoDB.
Returning in JSON format would be easier - though this depends on your customers requirements.
Thanks for your help. I have ended up simply creating username and password to mongo to my client and set correct permissions leaving them with doing all the heavy lifting.

Full-text search on MongoDB GridFS?

Say, if I want to store PDFs or ePub files using MongoDB's GridFS, is it possible to perform full-text searching on the data files?
You can't currently do real full text search within mongo: http://www.mongodb.org/display/DOCS/Full+Text+Search+in+Mongo
Feel free to vote for it here:
https://jira.mongodb.org/browse/SERVER-380
Mongo is more of a general purpose scalable data store, and as of yet it doesn't have any full text search support. Depending on your use case, you could use the standard b-tree indexes with an array of all of the words in the text, but it won't do stemming or fuzzy matches, etc.
However, I would recommend combining mongodb with a lucene-based application (elastic search is popular). You can store all of your data in mongodb (binary data, metadata, etc.), and then index the plain text of your documents in lucene. Or, if your use case is pure full text search, you might consider just using elastic search instead of mongodb.
Update (April 2013):
MongoDB 2.4 now supports a basic full-text index! Some useful resources below.
http://docs.mongodb.org/manual/applications/text-search/
http://docs.mongodb.org/manual/reference/command/text/#dbcmd.text
http://blog.mongohq.com/blog/2013/01/22/first-week-with-mongodb-2-dot-4-development-release/
Not using MongoDB APIs, not that I know of. GridFS seems to be designed to be more like a simplified file system with APIs that provides a straightforward key-value semantic. On their project ideas page they list two things that would help you if existed in production-ready state:
GridFS FUSE that would allow you to mount GridFS as a local file system and then index it like you would index stuff on your disk
Real-Time Full Text search integration with tools like Lucene and Solr. There are some projects on github and bitbucket that you might want to check out.
Also look at ElasticSearch. I have seen some integration with Mongo but I am not sure how much has been done to tap into the GridFS (GridFS attachment support is mentioned but I haven't worked with it to know for sure). Maybe you will be the one to build it and then opensource it? should be a fun adventure