Example #1
0
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),
	)}
}
Example #2
0
import (
	"github.com/balzaczyy/golucene/core/codec/lucene40"
	"github.com/balzaczyy/golucene/core/codec/lucene41"
	"github.com/balzaczyy/golucene/core/codec/perfield"
	. "github.com/balzaczyy/golucene/core/codec/spi"
	. "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