< Summary

Class:Microsoft.Azure.Search.SynonymMapsAttribute
Assembly:Microsoft.Azure.Search.Service
File(s):C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Customizations\Indexes\FieldBuilder\SynonymMapsAttribute.cs
Covered lines:4
Uncovered lines:0
Coverable lines:4
Total lines:37
Line coverage:100% (4 of 4)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
get_SynonymMaps()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Customizations\Indexes\FieldBuilder\SynonymMapsAttribute.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License. See License.txt in the project root for
 3// license information.
 4
 5using System;
 6using System.Collections.Generic;
 7using Microsoft.Azure.Search.Models;
 8
 9namespace Microsoft.Azure.Search
 10{
 11    /// <summary>
 12    /// Indicates that the <see cref="Field"/> generated by <see cref="FieldBuilder"/> for
 13    /// the target property should have its <see cref="Field.SynonymMaps"/> property set to the
 14    /// specified value.
 15    /// </summary>
 16    [AttributeUsage(AttributeTargets.Property)]
 17    public class SynonymMapsAttribute : Attribute
 18    {
 19        /// <summary>
 20        /// Indicates that the specified synonym maps should be used for searches on the target field.
 21        /// </summary>
 22        /// <param name="synonymMaps">A list of synonym map names that associates synonym maps with the field.
 23        /// This option can be used only with searchable fields. Currently only one synonym map per field is
 24        /// supported. Assigning a synonym map to a field ensures that query terms targeting that field are
 25        /// expanded at query-time using the rules in the synonym map.
 26        /// </param>
 532027        public SynonymMapsAttribute(params string[] synonymMaps)
 28        {
 532029            SynonymMaps = synonymMaps;
 532030        }
 31
 32        /// <summary>
 33        /// A list of synonym map names that associates synonym maps with the field.
 34        /// </summary>
 76035        public IList<string> SynonymMaps { get; }
 36    }
 37}

Methods/Properties

.ctor(...)
get_SynonymMaps()