Share via


Field.NewSearchableString Method

Definition

Creates a new searchable string Field with required arguments.

public static Microsoft.Azure.Search.Models.Field NewSearchableString (string name, Microsoft.Azure.Search.Models.AnalyzerName analyzerName, bool isKey = false, bool isRetrievable = true, bool isFilterable = false, bool isSortable = false, bool isFacetable = false, System.Collections.Generic.IList<string> synonymMaps = default);
static member NewSearchableString : string * Microsoft.Azure.Search.Models.AnalyzerName * bool * bool * bool * bool * bool * System.Collections.Generic.IList<string> -> Microsoft.Azure.Search.Models.Field
Public Shared Function NewSearchableString (name As String, analyzerName As AnalyzerName, Optional isKey As Boolean = false, Optional isRetrievable As Boolean = true, Optional isFilterable As Boolean = false, Optional isSortable As Boolean = false, Optional isFacetable As Boolean = false, Optional synonymMaps As IList(Of String) = Nothing) As Field

Parameters

name
String

The name of the string field.

analyzerName
AnalyzerName

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

isKey
Boolean

A value indicating whether the field uniquely identifies documents in the index. Default is false.

isRetrievable
Boolean

A value indicating whether the field can be returned in a search result. Default is true.

isFilterable
Boolean

A value indicating whether to enable the field to be referenced in $filter queries. Default is false.

isSortable
Boolean

A value indicating whether to enable the field to be referenced in $orderby expressions. Default is false.

isFacetable
Boolean

A value indicating whether to enable the field to be referenced in facet queries. Default is false.

synonymMaps
IList<String>

A list of synonym map names that associates synonym maps with the field. Default is null.

Returns

Remarks

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

Applies to