TIKA-1292: Simplified the patch

By re-prioritizing the hint, if exists, and
matches.