code: func (idx *index) clearCopy() *index {
  	// copy the index meta information
  	nidx := &index{
  		name:    idx.name,
  		pattern: idx.pattern,
  		db:      idx.db,
  		less:    idx.less,
  		rect:    idx.rect,
  		opts:    idx.opts,
  	}
  	// initialize with empty trees
  	if nidx.less != nil {
  		nidx.btr = btree.New(btreeDegrees, nidx)
  	}
  	if nidx.rect != nil {
  		nidx.rtr = rtree.New(nidx)
  	}
  	return nidx
  }
docs: // clearCopy creates a copy of the index, but with an empty dataset.