Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save rtanglao/999859 to your computer and use it in GitHub Desktop.

Select an option

Save rtanglao/999859 to your computer and use it in GitHub Desktop.
getNumberOfGetSatisfactionTopics w/"unified" between 2011 1 Jan to 2011 27 May

Answer: 85 (bug?) topics created with the word "unified" from Jan 1, 2011 to May 27, 2011

> var start2 = new Date(Date.UTC(2011,0,1));
> var end2 = new Date(Date.UTC(2011,4,27)); 
> db.topics.find({"created_at": {$gte: start2, $lt: end2},
"$where":"this.fulltext.indexOf(\"unified\") != -1"}).count();
85
@rtanglao
Copy link
Author

see identical query for an earlier period (August 1, 2010 to January 1, 2011):
https://gist.github.com/gists/999846/edit

@rtanglao
Copy link
Author

rtanglao commented Jun 5, 2011

with database fixed with 40000 instead of 23000 topics:

> var start2 = new Date(Date.UTC(2011,0,1));
> var end2 = new Date(Date.UTC(2011,4,27)); 
> db.topics.find({"created_at": {$gte: start2, $lt: end2},
... "$where":"this.fulltext.indexOf(\"unified\") != -1"}).count();
110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment