< Summary

Class:Azure.Search.Documents.Indexes.Models.DictionaryDecompounderTokenFilter
Assembly:Azure.Search.Documents
File(s):C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\DictionaryDecompounderTokenFilter.cs
C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\DictionaryDecompounderTokenFilter.Serialization.cs
C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Indexes\Models\DictionaryDecompounderTokenFilter.cs
Covered lines:0
Uncovered lines:77
Coverable lines:77
Total lines:184
Line coverage:0% (0 of 77)
Covered branches:0
Total branches:34
Branch coverage:0% (0 of 34)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_MinWordSize()-0%100%
get_MinSubwordSize()-0%100%
get_MaxSubwordSize()-0%100%
get_OnlyLongestMatch()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeDictionaryDecompounderTokenFilter(...)-0%0%
get_WordList()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\DictionaryDecompounderTokenFilter.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System;
 9using System.Collections.Generic;
 10using System.Linq;
 11
 12namespace Azure.Search.Documents.Indexes.Models
 13{
 14    /// <summary> Decomposes compound words found in many Germanic languages. This token filter is implemented using Apa
 15    public partial class DictionaryDecompounderTokenFilter : TokenFilter
 16    {
 17        /// <summary> Initializes a new instance of DictionaryDecompounderTokenFilter. </summary>
 18        /// <param name="name"> The name of the token filter. It must only contain letters, digits, spaces, dashes or un
 19        /// <param name="wordList"> The list of words to match against. </param>
 20        /// <exception cref="ArgumentNullException"> <paramref name="name"/> or <paramref name="wordList"/> is null. </e
 021        public DictionaryDecompounderTokenFilter(string name, IEnumerable<string> wordList) : base(name)
 22        {
 023            if (name == null)
 24            {
 025                throw new ArgumentNullException(nameof(name));
 26            }
 027            if (wordList == null)
 28            {
 029                throw new ArgumentNullException(nameof(wordList));
 30            }
 31
 032            WordList = wordList.ToList();
 033            ODataType = "#Microsoft.Azure.Search.DictionaryDecompounderTokenFilter";
 034        }
 35
 36        /// <summary> Initializes a new instance of DictionaryDecompounderTokenFilter. </summary>
 37        /// <param name="oDataType"> Identifies the concrete type of the token filter. </param>
 38        /// <param name="name"> The name of the token filter. It must only contain letters, digits, spaces, dashes or un
 39        /// <param name="wordList"> The list of words to match against. </param>
 40        /// <param name="minWordSize"> The minimum word size. Only words longer than this get processed. Default is 5. M
 41        /// <param name="minSubwordSize"> The minimum subword size. Only subwords longer than this are outputted. Defaul
 42        /// <param name="maxSubwordSize"> The maximum subword size. Only subwords shorter than this are outputted. Defau
 43        /// <param name="onlyLongestMatch"> A value indicating whether to add only the longest matching subword to the o
 044        internal DictionaryDecompounderTokenFilter(string oDataType, string name, IList<string> wordList, int? minWordSi
 45        {
 046            WordList = wordList;
 047            MinWordSize = minWordSize;
 048            MinSubwordSize = minSubwordSize;
 049            MaxSubwordSize = maxSubwordSize;
 050            OnlyLongestMatch = onlyLongestMatch;
 051            ODataType = oDataType ?? "#Microsoft.Azure.Search.DictionaryDecompounderTokenFilter";
 052        }
 53        /// <summary> The minimum word size. Only words longer than this get processed. Default is 5. Maximum is 300. </
 054        public int? MinWordSize { get; set; }
 55        /// <summary> The minimum subword size. Only subwords longer than this are outputted. Default is 2. Maximum is 3
 056        public int? MinSubwordSize { get; set; }
 57        /// <summary> The maximum subword size. Only subwords shorter than this are outputted. Default is 15. Maximum is
 058        public int? MaxSubwordSize { get; set; }
 59        /// <summary> A value indicating whether to add only the longest matching subword to the output. Default is fals
 060        public bool? OnlyLongestMatch { get; set; }
 61    }
 62}

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\DictionaryDecompounderTokenFilter.Serialization.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.Search.Documents.Indexes.Models
 13{
 14    public partial class DictionaryDecompounderTokenFilter : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("wordList");
 020            writer.WriteStartArray();
 021            foreach (var item in WordList)
 22            {
 023                writer.WriteStringValue(item);
 24            }
 025            writer.WriteEndArray();
 026            if (Optional.IsDefined(MinWordSize))
 27            {
 028                writer.WritePropertyName("minWordSize");
 029                writer.WriteNumberValue(MinWordSize.Value);
 30            }
 031            if (Optional.IsDefined(MinSubwordSize))
 32            {
 033                writer.WritePropertyName("minSubwordSize");
 034                writer.WriteNumberValue(MinSubwordSize.Value);
 35            }
 036            if (Optional.IsDefined(MaxSubwordSize))
 37            {
 038                writer.WritePropertyName("maxSubwordSize");
 039                writer.WriteNumberValue(MaxSubwordSize.Value);
 40            }
 041            if (Optional.IsDefined(OnlyLongestMatch))
 42            {
 043                writer.WritePropertyName("onlyLongestMatch");
 044                writer.WriteBooleanValue(OnlyLongestMatch.Value);
 45            }
 046            writer.WritePropertyName("@odata.type");
 047            writer.WriteStringValue(ODataType);
 048            writer.WritePropertyName("name");
 049            writer.WriteStringValue(Name);
 050            writer.WriteEndObject();
 051        }
 52
 53        internal static DictionaryDecompounderTokenFilter DeserializeDictionaryDecompounderTokenFilter(JsonElement eleme
 54        {
 055            IList<string> wordList = default;
 056            Optional<int> minWordSize = default;
 057            Optional<int> minSubwordSize = default;
 058            Optional<int> maxSubwordSize = default;
 059            Optional<bool> onlyLongestMatch = default;
 060            string odataType = default;
 061            string name = default;
 062            foreach (var property in element.EnumerateObject())
 63            {
 064                if (property.NameEquals("wordList"))
 65                {
 066                    List<string> array = new List<string>();
 067                    foreach (var item in property.Value.EnumerateArray())
 68                    {
 069                        array.Add(item.GetString());
 70                    }
 071                    wordList = array;
 072                    continue;
 73                }
 074                if (property.NameEquals("minWordSize"))
 75                {
 076                    minWordSize = property.Value.GetInt32();
 077                    continue;
 78                }
 079                if (property.NameEquals("minSubwordSize"))
 80                {
 081                    minSubwordSize = property.Value.GetInt32();
 082                    continue;
 83                }
 084                if (property.NameEquals("maxSubwordSize"))
 85                {
 086                    maxSubwordSize = property.Value.GetInt32();
 087                    continue;
 88                }
 089                if (property.NameEquals("onlyLongestMatch"))
 90                {
 091                    onlyLongestMatch = property.Value.GetBoolean();
 092                    continue;
 93                }
 094                if (property.NameEquals("@odata.type"))
 95                {
 096                    odataType = property.Value.GetString();
 097                    continue;
 98                }
 099                if (property.NameEquals("name"))
 100                {
 0101                    name = property.Value.GetString();
 102                    continue;
 103                }
 104            }
 0105            return new DictionaryDecompounderTokenFilter(odataType, name, wordList, Optional.ToNullable(minWordSize), Op
 106        }
 107    }
 108}

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Indexes\Models\DictionaryDecompounderTokenFilter.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System.Collections.Generic;
 5using Azure.Core;
 6
 7namespace Azure.Search.Documents.Indexes.Models
 8{
 9    public partial class DictionaryDecompounderTokenFilter
 10    {
 11        /// <summary> The list of words to match against. </summary>
 012        public IList<string> WordList { get; }
 13    }
 14}