Exemplo n.º 1
0
 public override void AddPosition(int position, int startOffset, int endOffset, BytesRef payload)
 {
     Debug.Assert(CurField.Flags != 0);
     CurField.AddPosition(position, startOffset, endOffset - startOffset, payload == null ? 0 : payload.Length);
     if (CurField.HasPayloads && payload != null)
     {
         PayloadBytes.WriteBytes(payload.Bytes, payload.Offset, payload.Length);
     }
 }
Exemplo n.º 2
0
 public override void AddPosition(int position, int startOffset, int endOffset, BytesRef payload)
 {
     if (Debugging.AssertsEnabled)
     {
         Debugging.Assert(curField.flags != 0);
     }
     curField.AddPosition(position, startOffset, endOffset - startOffset, payload == null ? 0 : payload.Length);
     if (curField.hasPayloads && payload != null)
     {
         payloadBytes.WriteBytes(payload.Bytes, payload.Offset, payload.Length);
     }
 }