FieldMappingFunction.ExtractTokenAtPosition(String, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a field mapping function that splits a string field using the specified delimiter, and picks the token at the specified position in the resulting split.
public static Microsoft.Azure.Search.Models.FieldMappingFunction ExtractTokenAtPosition (string delimiter, int position);
static member ExtractTokenAtPosition : string * int -> Microsoft.Azure.Search.Models.FieldMappingFunction
Public Shared Function ExtractTokenAtPosition (delimiter As String, position As Integer) As FieldMappingFunction
Parameters
- delimiter
- String
A string to use as the separator when splitting the input string.
- position
- Int32
An integer zero-based position of the token to pick after the input string is split.
Returns
A new field mapping function.
Remarks
For example, if the input is Jane Doe, the delimiter is " " (space) and the position is 0, the result is Jane; if the position is 1, the result is Doe. If the position refers to a token that doesn't exist, an error will be returned.
Sample use case: Your data source contains a PersonName field, and you want to index it as two separate FirstName and LastName fields. You can use this function to split the input using the space character as the delimiter.
Applies to
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기