github.com/balzaczyy/golucene@v0.0.0-20151210033525-d0be9ee89713/core/codec/termStats.go (about)

     1  package codec
     2  
     3  /* Holder for per-term statistics. */
     4  type TermStats struct {
     5  	// How many documents have at least one occurrence of this term.
     6  	DocFreq int
     7  	// Total number of times this term occurs across all documents in
     8  	// the field.
     9  	TotalTermFreq int64
    10  }
    11  
    12  func NewTermStats(docFreq int, totalTermFreq int64) *TermStats {
    13  	return &TermStats{docFreq, totalTermFreq}
    14  }