title: TF-IDF vector contents when computing cosine similarity for document search
body: <p>Say you're trying to find the most similar document in a corpus to a given search query. I've seen some examples create TF-IDF vectors that are the length of the given query, and some create TF-IDF vectors that use every term in the corpus.</p>
  
  <p>Is one of these ways the "correct" way to do it?</p>