func NewSegmentWriteStateFrom(state *SegmentWriteState,
	segmentSuffix string) *SegmentWriteState {
	return &SegmentWriteState{
		state.infoStream,
		state.Directory,
		state.SegmentInfo,
		state.FieldInfos,
		state.DelCountOnFlush,
		state.SegUpdates,
		nil,
		segmentSuffix,
		state.termIndexInterval,
		state.Context,
	}
}
/* Create a shallow copy of SegmentWriteState with a new segment suffix.
package model
import (
	"github.com/balzaczyy/golucene/core/store"
	"github.com/balzaczyy/golucene/core/util"
	"strconv"
	"strings"
)
type SegmentWriteState struct {
	infoStream        util.InfoStream
	Directory         store.Directory
	SegmentInfo       *SegmentInfo
	FieldInfos        FieldInfos
	DelCountOnFlush   int
	SegUpdates        interface{}  
	LiveDocs          util.MutableBits
	SegmentSuffix     string
	termIndexInterval int
	Context           store.IOContext
}
func NewSegmentWriteState(infoStream util.InfoStream,
	dir store.Directory, segmentInfo *SegmentInfo,
	fieldInfos FieldInfos, termIndexInterval int,
	SegUpdates interface{}, ctx store.IOContext) *SegmentWriteState {
	return NewSegmentWriteState2(
		infoStream, dir, segmentInfo, fieldInfos, termIndexInterval,
		SegUpdates, ctx, "")
}
func NewSegmentWriteState2(infoStream util.InfoStream,
	dir store.Directory, segmentInfo *SegmentInfo,
	fieldInfos FieldInfos, termIndexInterval int,
	SegUpdates interface{}, ctx store.IOContext,
	segmentSuffix string) *SegmentWriteState {
	ans := &SegmentWriteState{
		infoStream:        infoStream,
		Directory:         dir,
		SegmentInfo:       segmentInfo,
		FieldInfos:        fieldInfos,
		SegUpdates:        SegUpdates,
		SegmentSuffix:     segmentSuffix,
		termIndexInterval: termIndexInterval,
		Context:           ctx,
	}
	assert(ans.assertSegmentSuffix(segmentSuffix))
	return ans
}