public sealed class SuggestionInfo.Types.MatchInfo : IMessage<SuggestionInfo.Types.MatchInfo>, IEquatable<SuggestionInfo.Types.MatchInfo>, IDeepCloneable<SuggestionInfo.Types.MatchInfo>, IBufferMessage, IMessage
Reference documentation and code samples for the Data QnA v1alpha API class SuggestionInfo.Types.MatchInfo.
MatchInfo describes which part of suggestion matched with data in user
typed query. This can be used to highlight matching parts in the UI. This
is different from the annotations provided in annotated_suggestion. The
annotated_suggestion provides information about the semantic meaning, while
this provides information about how it relates to the input.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eSuggestionInfo.Types.MatchInfo\u003c/code\u003e class in the Data QnA v1alpha API helps identify which parts of a suggestion correspond to the user's input, enabling UI highlighting.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMatchInfo\u003c/code\u003e differs from \u003ccode\u003eannotated_suggestion\u003c/code\u003e by focusing on the relationship to the input query rather than the semantic meaning of the suggestion.\u003c/p\u003e\n"],["\u003cp\u003eThe class has two key properties, \u003ccode\u003eLength\u003c/code\u003e and \u003ccode\u003eStartCharIndex\u003c/code\u003e, which respectively specify the length of the matching substring and the starting character index within the user's query.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and is available within the \u003ccode\u003eGoogle.Cloud.DataQnA.V1Alpha\u003c/code\u003e namespace, found in the \u003ccode\u003eGoogle.Cloud.DataQnA.V1Alpha.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMatchInfo\u003c/code\u003e class has two constructors, a parameterless constructor and another constructor which takes in \u003ccode\u003eSuggestionInfo.Types.MatchInfo\u003c/code\u003e as a parameter.\u003c/p\u003e\n"]]],[],null,["# Data QnA v1alpha API - Class SuggestionInfo.Types.MatchInfo (2.0.0-alpha02)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.0-alpha02 (latest)](/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.SuggestionInfo.Types.MatchInfo)\n- [2.0.0-alpha01](/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/2.0.0-alpha01/Google.Cloud.DataQnA.V1Alpha.SuggestionInfo.Types.MatchInfo)\n- [1.0.0-alpha03](/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/1.0.0-alpha03/Google.Cloud.DataQnA.V1Alpha.SuggestionInfo.Types.MatchInfo) \n\n public sealed class SuggestionInfo.Types.MatchInfo : IMessage\u003cSuggestionInfo.Types.MatchInfo\u003e, IEquatable\u003cSuggestionInfo.Types.MatchInfo\u003e, IDeepCloneable\u003cSuggestionInfo.Types.MatchInfo\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Data QnA v1alpha API class SuggestionInfo.Types.MatchInfo.\n\nMatchInfo describes which part of suggestion matched with data in user\ntyped query. This can be used to highlight matching parts in the UI. This\nis different from the annotations provided in annotated_suggestion. The\nannotated_suggestion provides information about the semantic meaning, while\nthis provides information about how it relates to the input.\n\nExample:\nuser query: `top products` \n\n annotated_suggestion {\n text_formatted = \"top product_group\"\n html_formatted = \"top \u003cb\u003eproduct_group\u003c/b\u003e\"\n markups {\n {type: TEXT, start_char_index: 0, length: 3}\n {type: DIMENSION, start_char_index: 4, length: 13}\n }\n }\n\n query_matches {\n { start_char_index: 0, length: 3 }\n { start_char_index: 4, length: 7}\n }\n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e SuggestionInfo.Types.MatchInfo \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[SuggestionInfo](/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.SuggestionInfo)[Types](/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.SuggestionInfo.Types)[MatchInfo](/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.SuggestionInfo.Types.MatchInfo), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[SuggestionInfo](/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.SuggestionInfo)[Types](/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.SuggestionInfo.Types)[MatchInfo](/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.SuggestionInfo.Types.MatchInfo), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[SuggestionInfo](/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.SuggestionInfo)[Types](/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.SuggestionInfo.Types)[MatchInfo](/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha.SuggestionInfo.Types.MatchInfo), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.DataQnA.V1Alpha](/dotnet/docs/reference/Google.Cloud.DataQnA.V1Alpha/latest/Google.Cloud.DataQnA.V1Alpha)\n\nAssembly\n--------\n\nGoogle.Cloud.DataQnA.V1Alpha.dll\n\nConstructors\n------------\n\n### MatchInfo()\n\n public MatchInfo()\n\n### MatchInfo(MatchInfo)\n\n public MatchInfo(SuggestionInfo.Types.MatchInfo other)\n\nProperties\n----------\n\n### Length\n\n public int Length { get; set; }\n\nCount of unicode characters of this substring.\n\n### StartCharIndex\n\n public int StartCharIndex { get; set; }\n\nUnicode character index of the string annotation."]]