func (c *TermVectorsConsumerPerField) finishDocument() error {
	panic("not implemented yet")
}
/*
Called once per field per document if term vectors are enabled, to
write the vectors to RAMOutputStream, which is then quickly flushed
to the real term vectors files in the Directory.

func (c *TermVectorsConsumerPerField) finish() error {
if !c.doVectors || c.termsHashPerField.bytesHash.Size() == 0 {
return nil
}
c.termsWriter.addFieldToFlush(c)
return nil
}
package index
import (
	. "github.com/balzaczyy/golucene/core/analysis/tokenattributes"
	"github.com/balzaczyy/golucene/core/codec"
	. "github.com/balzaczyy/golucene/core/codec/spi"
	. "github.com/balzaczyy/golucene/core/index/model"
	"github.com/balzaczyy/golucene/core/util"
)
type TermVectorsConsumerPerField struct {
	*TermsHashPerFieldImpl
	termVectorsPostingsArray *TermVectorsPostingArray
	termsWriter *TermVectorsConsumer
	doVectors, doVectorPositions, doVectorOffsets, doVectorPayloads bool
	payloadAttribute PayloadAttribute
	offsetAttribute  OffsetAttribute
	hasPayloads      bool  
}
func newTermVectorsConsumerPerField(invertState *FieldInvertState,
	termsWriter *TermVectorsConsumer,
	fieldInfo *FieldInfo) *TermVectorsConsumerPerField {
	ans := &TermVectorsConsumerPerField{
		termsWriter: termsWriter,
	}
	ans.TermsHashPerFieldImpl = new(TermsHashPerFieldImpl)
	ans.TermsHashPerFieldImpl._constructor(
		ans, 2, invertState, termsWriter, nil, fieldInfo)
	return ans
}
func (c *TermVectorsConsumerPerField) start(field IndexableField, first bool) bool {
	t := field.FieldType()
	assert(t.Indexed())
	if first {
		if c.bytesHash.Size() != 0 {
			c.reset()
		}
		c.bytesHash.Reinit()
		c.hasPayloads = false
		if c.doVectors = t.StoreTermVectors(); c.doVectors {
			panic("not implemented yet")
		} else {
			assert2(!t.StoreTermVectorOffsets(),
				"cannot index term vector offsets when term vectors are not indexed (field='%v')",
				field.Name())
			assert2(!t.StoreTermVectorPositions(),
				"cannot index term vector positions when term vectors are not indexed (field='%v')",
				field.Name())
			assert2(!t.StoreTermVectorPayloads(),
				"cannot index term vector payloads when term vectors are not indexed (field='%v')",
				field.Name())
		}
	} else {
		panic("not implemented yet")
	}
	if c.doVectors {
		panic("not implemented yet")
	}
	return c.doVectors
}