It's not about some simple word frequencies of words. Some common words like "like" "need" "second" "part" in the dataset of whole documents isn't so meaningful in a specific sentence. Google "tf-idf" will show you more details about this.
Ok, I looked that up.
Again isn't this something that Elasticsearch would do without needing to set up a machine learning system?