added a min_docs_per_term setting