This:

recordName.contains(word)
is not how a scanner works.

What you do here is to check whether the String referenced by "word" is contained within the String referenced by "recordName".
But...