code: public void collectTfIdfTerms(boolean collectTfIdfTerms) {
      if (this.collectTfIdfTerms != collectTfIdfTerms) {
        this.collectTfIdfTerms = collectTfIdfTerms;
        changed = true;
        if (tfidfCalculator != null) {
          tfidfCalculator.enableTermCollection(collectTfIdfTerms);
        }
      }
    }
docs: Sets the flag whether the measurement should collect each individual
  terms with their Term Ferquency and Invers Document Frequency scores.
  
  @param collectTfIdfTerms
  The TF-IDF collector flag