github.com/balzaczyy/golucene@v0.0.0-20151210033525-d0be9ee89713/core/index/model/docsEnum.go (about) 1 package model 2 3 import ( 4 . "github.com/balzaczyy/golucene/core/search/model" 5 ) 6 7 const ( 8 DOCS_ENUM_FLAG_FREQS = 1 9 ) 10 11 type DocsEnum interface { 12 DocIdSetIterator 13 /** 14 * Returns term frequency in the current document, or 1 if the field was 15 * indexed with {@link IndexOptions#DOCS_ONLY}. Do not call this before 16 * {@link #nextDoc} is first called, nor after {@link #nextDoc} returns 17 * {@link DocIdSetIterator#NO_MORE_DOCS}. 18 * 19 * <p> 20 * <b>NOTE:</b> if the {@link DocsEnum} was obtain with {@link #FLAG_NONE}, 21 * the result of this method is undefined. 22 */ 23 Freq() (n int, err error) 24 }