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), )} }
// 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) { panic("not implemented yet") }
postings and docvalues formats. If you want to reuse functionality of this codec, in another codec, extend FilterCodec. */ var Lucene42Codec = 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 { panic("not implemented yet") }), newReadonlyLucene42NormsFormat(), ) func init() { RegisterCodec(Lucene42Codec) } type readonlyLucene42NormsFormat struct { *Lucene42NormsFormat } func (f *readonlyLucene42NormsFormat) NormsConsumer(state *SegmentWriteState) (w DocValuesConsumer, err error) { panic("this codec can only be used for reading") }