Constructor Term
Term(String, BytesRef)
Constructs a Term with the given field and bytes.
Note that a null field or null bytes value results in undefined behavior for most Lucene APIs that accept a Term parameter.
WARNING: the provided BytesRef is not copied, but used directly. Therefore the bytes should not be modified after construction, for example, you should clone a copy by DeepCopyOf(BytesRef) rather than pass reused bytes from a TermsEnum.
Declaration
public Term(string fld, BytesRef bytes)
Parameters
Type | Name | Description |
---|---|---|
System.String | fld | |
BytesRef | bytes |
Term(String, String)
Constructs a Term with the given field and text.
Note that a null
field or null text value results in undefined
behavior for most Lucene APIs that accept a Term parameter.
Declaration
public Term(string fld, string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | fld | |
System.String | text |
Term(String)
Constructs a Term with the given field and empty text. this serves two purposes: 1) reuse of a Term with the same field. 2) pattern for a query.
Declaration
public Term(string fld)
Parameters
Type | Name | Description |
---|---|---|
System.String | fld | field's name |