你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
AnalyzedTokenInfo Class
- java.
lang. Object - com.
azure. search. documents. indexes. models. AnalyzedTokenInfo
- com.
Implements
public final class AnalyzedTokenInfo
implements JsonSerializable<AnalyzedTokenInfo>
Information about a token returned by an analyzer.
Constructor Summary
Constructor | Description |
---|---|
AnalyzedTokenInfo(String token, int startOffset, int endOffset, int position) |
Creates an instance of Analyzed |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Analyzed |
fromJson(JsonReader jsonReader)
Reads an instance of Analyzed |
int |
getEndOffset()
Get the end |
int |
getPosition()
Get the position property: The position of the token in the input text relative to other tokens. |
int |
getStartOffset()
Get the start |
String |
getToken()
Get the token property: The token returned by the analyzer. |
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
AnalyzedTokenInfo
public AnalyzedTokenInfo(String token, int startOffset, int endOffset, int position)
Creates an instance of AnalyzedTokenInfo class.
Parameters:
Method Details
fromJson
public static AnalyzedTokenInfo fromJson(JsonReader jsonReader)
Reads an instance of AnalyzedTokenInfo from the JsonReader.
Parameters:
Returns:
Throws:
getEndOffset
public int getEndOffset()
Get the endOffset property: The index of the last character of the token in the input text.
Returns:
getPosition
public int getPosition()
Get the position property: The position of the token in the input text relative to other tokens. The first token in the input text has position 0, the next has position 1, and so on. Depending on the analyzer used, some tokens might have the same position, for example if they are synonyms of each other.
Returns:
getStartOffset
public int getStartOffset()
Get the startOffset property: The index of the first character of the token in the input text.
Returns:
getToken
public String getToken()
Get the token property: The token returned by the analyzer.
Returns: