다음을 통해 공유


Field Constructors

Definition

Overloads

Field(String, AnalyzerName)

Initializes a new searchable string Field with required arguments.

Field(String, DataType)

Initializes a new simple Field with required arguments.

Field(String, DataType, AnalyzerName)

Initializes a new searchable simple Field with required arguments.

Field(String, DataType, IList<Field>)

Initializes a new complex Field with required arguments.

Field(String, AnalyzerName)

Source:
Field.Customization.cs

Initializes a new searchable string Field with required arguments.

public Field (string name, Microsoft.Azure.Search.Models.AnalyzerName analyzerName);
new Microsoft.Azure.Search.Models.Field : string * Microsoft.Azure.Search.Models.AnalyzerName -> Microsoft.Azure.Search.Models.Field
Public Sub New (name As String, analyzerName As AnalyzerName)

Parameters

name
String

The name of the string field.

analyzerName
AnalyzerName

The name of the analyzer to use for the simple field.

Remarks

The new field will automatically be searchable and of type Edm.String.

Applies to

Field(String, DataType)

Source:
Field.Customization.cs

Initializes a new simple Field with required arguments.

public Field (string name, Microsoft.Azure.Search.Models.DataType dataType);
new Microsoft.Azure.Search.Models.Field : string * Microsoft.Azure.Search.Models.DataType -> Microsoft.Azure.Search.Models.Field
Public Sub New (name As String, dataType As DataType)

Parameters

name
String

The name of the simple field.

dataType
DataType

The data type of the simple field. Cannot be a complex type.

Exceptions

Thrown if dataType is a complex type.

Applies to

Field(String, DataType, AnalyzerName)

Source:
Field.Customization.cs

Initializes a new searchable simple Field with required arguments.

public Field (string name, Microsoft.Azure.Search.Models.DataType dataType, Microsoft.Azure.Search.Models.AnalyzerName analyzerName);
new Microsoft.Azure.Search.Models.Field : string * Microsoft.Azure.Search.Models.DataType * Microsoft.Azure.Search.Models.AnalyzerName -> Microsoft.Azure.Search.Models.Field
Public Sub New (name As String, dataType As DataType, analyzerName As AnalyzerName)

Parameters

name
String

The name of the simple field.

dataType
DataType

The data type of the field. Cannot be a complex type.

analyzerName
AnalyzerName

The name of the analyzer to use for the field.

Exceptions

Thrown if dataType is a complex type.

Remarks

The new field will automatically be searchable.

Applies to

Field(String, DataType, IList<Field>)

Source:
Field.Customization.cs

Initializes a new complex Field with required arguments.

public Field (string name, Microsoft.Azure.Search.Models.DataType dataType, System.Collections.Generic.IList<Microsoft.Azure.Search.Models.Field> fields);
new Microsoft.Azure.Search.Models.Field : string * Microsoft.Azure.Search.Models.DataType * System.Collections.Generic.IList<Microsoft.Azure.Search.Models.Field> -> Microsoft.Azure.Search.Models.Field
Public Sub New (name As String, dataType As DataType, fields As IList(Of Field))

Parameters

name
String

The name of the complex field.

dataType
DataType

The data type of the field. Must be a complex type.

fields
IList<Field>

The sub-fields that comprise the complex type. They can be simple or complex fields themselves.

Exceptions

Thrown if dataType is not a complex type.

Thrown if fields is null.

Thrown if fields is empty.

Applies to