How Search Works: Term Frequency and Inverse Document Frequency