|  | Lucene.Net
    3.0.3
    Lucene.Net is a .NET port of the Java Lucene Indexing Library | 
A Payload is metadata that can be stored together with each occurrence of a term. This metadata is stored inline in the posting list of the specific term. To store payloads in the index a TokenStream has to be used that produces payload data. Use TermPositions.PayloadLength and TermPositions.GetPayload(byte[], int) to retrieve the payloads from the index.
  
 More...
Inherits ICloneable.
| Public Member Functions | |
| Payload () | |
| Creates an empty payload and does not allocate a byte array. | |
| Payload (byte[] data) | |
| Creates a new payload with the the given array as data. A reference to the passed-in array is held, i. e. no copy is made. | |
| Payload (byte[] data, int offset, int length) | |
| Creates a new payload with the the given array as data. A reference to the passed-in array is held, i. e. no copy is made. | |
| virtual void | SetData (byte[] value, int offset, int length) | 
| Sets this payloads data. A reference to the passed-in array is held, i. e. no copy is made. | |
| virtual void | SetData (byte[] value) | 
| Gets or sets a reference to the underlying byte array that holds this payloads data. Data is not copied. | |
| virtual byte[] | GetData () | 
| Gets or sets a reference to the underlying byte array that holds this payloads data. Data is not copied. | |
| virtual byte | ByteAt (int index) | 
| Returns the byte at the given index. | |
| virtual byte[] | ToByteArray () | 
| Allocates a new byte array, copies the payload data into it and returns it. | |
| virtual void | CopyTo (byte[] target, int targetOffset) | 
| Copies the payload data to a byte array. | |
| virtual System.Object | Clone () | 
| Clones this payload by creating a copy of the underlying byte array. | |
| override bool | Equals (System.Object obj) | 
| override int | GetHashCode () | 
| Properties | |
| virtual int | Offset  [get] | 
| Returns the offset in the underlying byte array | |
| virtual int | Length  [get] | 
| Returns the length of the payload data. | |
A Payload is metadata that can be stored together with each occurrence of a term. This metadata is stored inline in the posting list of the specific term.
To store payloads in the index a TokenStream has to be used that produces payload data.
Use TermPositions.PayloadLength and TermPositions.GetPayload(byte[], int) to retrieve the payloads from the index.
 
Definition at line 38 of file Payload.cs.
| Lucene.Net.Index.Payload.Payload | ( | ) | 
Creates an empty payload and does not allocate a byte array.
Definition at line 50 of file Payload.cs.
| Lucene.Net.Index.Payload.Payload | ( | byte[] | data | ) | 
Creates a new payload with the the given array as data. A reference to the passed-in array is held, i. e. no copy is made.
| data | the data of this payload | 
Definition at line 62 of file Payload.cs.
| Lucene.Net.Index.Payload.Payload | ( | byte[] | data, | 
| int | offset, | ||
| int | length | ||
| ) | 
Creates a new payload with the the given array as data. A reference to the passed-in array is held, i. e. no copy is made.
| data | the data of this payload | 
| offset | the offset in the data byte array | 
| length | the length of the data | 
Definition at line 77 of file Payload.cs.
| 
 | virtual | 
Returns the byte at the given index.
Definition at line 128 of file Payload.cs.
| 
 | virtual | 
Clones this payload by creating a copy of the underlying byte array.
Definition at line 164 of file Payload.cs.
| 
 | virtual | 
Copies the payload data to a byte array.
| target | the target byte array | 
| targetOffset | the offset in the target byte array | 
Definition at line 152 of file Payload.cs.
| override bool Lucene.Net.Index.Payload.Equals | ( | System.Object | obj | ) | 
Definition at line 191 of file Payload.cs.
| 
 | virtual | 
Gets or sets a reference to the underlying byte array that holds this payloads data. Data is not copied.
Definition at line 110 of file Payload.cs.
| override int Lucene.Net.Index.Payload.GetHashCode | ( | ) | 
Definition at line 212 of file Payload.cs.
| 
 | virtual | 
Sets this payloads data. A reference to the passed-in array is held, i. e. no copy is made.
Definition at line 92 of file Payload.cs.
| 
 | virtual | 
Gets or sets a reference to the underlying byte array that holds this payloads data. Data is not copied.
Definition at line 102 of file Payload.cs.
| 
 | virtual | 
Allocates a new byte array, copies the payload data into it and returns it.
Definition at line 138 of file Payload.cs.
| 
 | get | 
Returns the length of the payload data.
Definition at line 123 of file Payload.cs.
| 
 | get | 
Returns the offset in the underlying byte array
Definition at line 117 of file Payload.cs.
 1.8.3
 1.8.3