[00:31:28] <sqwishy> If I pass raw user input as filters for the find method, is there a way they can exploit the $where operator or something to do nasty things?
[02:29:23] <BobFunk> trying to add a new member to a replica set, but can't get it to sync
[02:29:27] <BobFunk> keep getting: initial sync exception: 10089 can't remove from a capped collection 5 attempts remaining
[15:29:22] <Deathspike> I am experimenting to use MongoDB instead of SQL for a production website. I could use some information regarding mapping of data. I understand that everything is essentially a document and lookup is to be avoided, but how do I do searches based on partial text (searching titles of TV series, for example) and how can I efficiently create a genres search (i.e. each document has an array with genres, should I add references of each
[15:29:22] <Deathspike> document id to a different collection with that genre name to quickly be able to search?). Help is appreciated.
[15:31:24] <kali> for full text, there is nothing like a full text engine
[15:32:50] <Deathspike> kali: Would it be acceptable to store names of genres in the actual documents and searching through that, or is it much faster to have a dedicated array with all references to see if it is contained (Assuming the latter for performance)?
[15:33:22] <kali> it would not make a big difference
[15:35:00] <Deathspike> And regarding title searches, is there anything remotely similar to calculating the Levenshtein distance for approximate matching?
[15:35:10] <Deathspike> Or, in SQL-terms, LIKE '%something%'?
[15:36:35] <kali> Deathspike: you can use regexp. but for %something% you'll be O(n)
[15:38:28] <Deathspike> kali: Would you have a recommendation on how to solve this particular issue?
[15:39:10] <kali> Deathspike: use a full text engine
[15:41:05] <Deathspike> kali: Seeing as I have little experience with full text engines, is there a 'recommended' one to pair with MongoDB for easier integration?
[15:41:55] <kali> Deathspike: you'll basically have to do everything on tha app side, so mongodb does not make a big difference. popular choices are solr and elasticsearc
[15:43:15] <Deathspike> kali: Ah I was under the impression it was possible to have changes in MongoDB be automatically replicated into a search engine and that there might be readily available packages to do that for you. Thanks for the information. :)
[15:48:20] <kali> Deathspike: some data access layer may help you with that... i called them ODM last time, but i was made to understand it was pedantic. so look at your ORM layer
[17:20:56] <Aartsie> how can i get the information from docs ? https://gist.github.com/9fdd914cbefda24b734f i have try to put it in an array, object and string but it looks that i have no acces to the find({}, function(err, docs){ }); scoop
[18:58:49] <owen1> let's say i have 3 hosts in my replica set. 1 can't see the other two. will he become a primary? what if the other 2 are ok, it's just a network issue?
[18:59:07] <dreinull> would it be possible to build a string on the mongo server before it returns the id? These ids are going to be urls for a sitemap and if mongo could do that for me the costs would even be cheaper
[19:00:47] <kali> owen1: 1 out of 3 will not becomes primary, it can not get a majority
[19:01:28] <kali> owen1: if the primary was one of the two still seeing each other, it will stay primary