Skip to content

danielhinker/mongoDB-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

MongoDB-Script

Script to find the most frequently used word in a data set, in the past 24 hours, the "trending" word, which appears most in the last 24 hours over the previous 24 hours.

In the mongo terminal, type the command below:

load('script.js')

The word that occurs the most in the data set is saved in the variable below:

mostCommonWord

The word that occurs most frequently in the past 24 hours is saved in:

commonPastWord

The trending word which is the one that increased in used in the past 24 hours over the previous 24 hours is:

trendingWord

Just type it in the console and you will get the word

There are other commands that can show you the detailed counts of each word, you can check it out on the script.js file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published