IDF implementation with documents