code: func (w *Lucene41PostingsWriter) AddPosition(position int,
  	payload []byte, startOffset, endOffset int) error {
  
  	w.posDeltaBuffer[w.posBufferUpto] = position - w.lastPosition
  	if w.fieldHasPayloads {
  		if len(payload) == 0 {
  			// no paylaod
  			w.payloadLengthBuffer[w.posBufferUpto] = 0
  		} else {
  			panic("not implemented yet")
  		}
  	}
  
  	if w.fieldHasOffsets {
  		panic("not implemented yet")
  	}
  
  	w.posBufferUpto++
  	w.lastPosition = position
  	if w.posBufferUpto == LUCENE41_BLOCK_SIZE {
  		var err error
  		if err = w.forUtil.writeBlock(w.posDeltaBuffer, w.encoded, w.posOut); err != nil {
  			return err
  		}
  
  		if w.fieldHasPayloads {
  			panic("niy")
  		}
  		if w.fieldHasOffsets {
  			panic("niy")
  		}
  		w.posBufferUpto = 0
  	}
  	return nil
  }
docs: /* Add a new opsition & payload */