func newLucene49Codec() *Lucene49Codec { return &Lucene49Codec{NewCodec("Lucene49", lucene41.NewLucene41StoredFieldsFormat(), lucene42.NewLucene42TermVectorsFormat(), lucene46.NewLucene46FieldInfosFormat(), lucene46.NewLucene46SegmentInfoFormat(), new(lucene40.Lucene40LiveDocsFormat), perfield.NewPerFieldPostingsFormat(func(field string) PostingsFormat { return LoadPostingsFormat("Lucene41") }), perfield.NewPerFieldDocValuesFormat(func(field string) DocValuesFormat { panic("not implemented yet") }), new(Lucene49NormsFormat), )} }
. "github.com/balzaczyy/golucene/core/index/model" ) // lucene42/Lucene42RWCodec.java var dv = newLucene42RWDocValuesFormat() // Read-write version of Lucene42Codec for testing. var Lucene42RWCodec = NewCodec("Lucene42", lucene41.NewLucene41StoredFieldsFormat(), NewLucene42TermVectorsFormat(), NewLucene42FieldInfosFormat(), lucene40.NewLucene40SegmentInfoFormat(), nil, // liveDocsFormat perfield.NewPerFieldPostingsFormat(func(field string) PostingsFormat { panic("not implemented yet") }), perfield.NewPerFieldDocValuesFormat(func(field string) DocValuesFormat { return dv }), NewLucene42NormsFormat(), ) // lucene42/Lucene42RWDocValuesFormat.java // Read-write version of Lucene42DocValuesFormat for testing type Lucene42RWDocValuesFormat struct { *Lucene42DocValuesFormat } func (f *Lucene42RWDocValuesFormat) FieldsConsumer(state *SegmentWriteState) (w DocValuesConsumer, err error) {