Class SimpleFieldAttribute
Attributes a simple field using a primitive type or a collection of a primitive type.
Inheritance
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.Search.Documents.dll
Syntax
[System.AttributeUsage(System.AttributeTargets.Property | System.AttributeTargets.Field, AllowMultiple=false, Inherited=true)]
public class SimpleFieldAttribute : Attribute
Constructors
SimpleFieldAttribute()
Declaration
public SimpleFieldAttribute ();
Properties
IsFacetable
Gets or sets a value indicating whether the field can be retrieved in facet queries. The default is false.
Declaration
public bool IsFacetable { get; set; }
Property Value
System.Boolean
|
Remarks
Facets are used in presentation of search results that include hit counts by categories.
For example, in a search for digital cameras, facets might include branch, megapixels, price, etc.
IsFilterable
Gets or sets a value indicating whether the field can be referenced in $filter
queries. The default is false.
Declaration
public bool IsFilterable { get; set; }
Property Value
System.Boolean
|
Remarks
Filterable differs from searchable in how strings are handled. Fields of type String or "Collection(DataType.String)" that are filterable do not undergo word-breaking, so comparisons are for exact matches only.
For example, if you set such a field f
to "sunny day", $filter=f eq 'sunny'
will find no matches, but $filter=f eq 'sunny day'
will.
IsHidden
Gets or sets whether the field is returned in search results. The default is false. A key field where IsKey is true must have this property set to false.
Declaration
public bool IsHidden { get; set; }
Property Value
System.Boolean
|
IsKey
Gets or sets whether the field is the key field. The default is false. A SearchIndex must have exactly one key field of type String.
Declaration
public bool IsKey { get; set; }
Property Value
System.Boolean
|
IsSortable
Gets or sets a value indicating whether to enable the field can be referenced in $orderby
expressions. The default is false.
Declaration
public bool IsSortable { get; set; }
Property Value
System.Boolean
|
Remarks
By default Azure Cognitive Search sorts results by score, but in many experiences users may want to sort by fields in the documents.
NormalizerName
The name of the normalizer to use for the field. This option can be used only with fields with filterable, sortable, or facetable enabled. Once the normalizer is chosen, it cannot be changed for the field. Must be null for complex fields.
Declaration
public string NormalizerName { get; set; }
Property Value
System.String
String values from LexicalNormalizerName.Values. |