public class SearchLogRequest extends AbstractModel
header, skipSign
Constructor and Description |
---|
SearchLogRequest() |
SearchLogRequest(SearchLogRequest source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
String |
getContext()
Get Pass the Context value returned by the last API call to retrieve more subsequent logs.
|
Long |
getFrom()
Get Start time of the log to be searched, which is a Unix timestamp in milliseconds
|
Long |
getLimit()
Get Specifies the number of raw logs returned in a single query, default is 100, maximum is 1000.
|
String |
getQuery()
Get Search and analysis statement.
|
Float |
getSamplingRate()
Get Indicates whether to sample raw logs before statistical analysis (`Query` includes SQL statements).
|
String |
getSort()
Get Time order of the logs returned.
|
Long |
getSyntaxRule()
Get Retrieval syntax rule, default is 0, recommended to use 1 (CQL syntax).0: Lucene syntax, 1: CQL syntax.
|
Long |
getTo()
Get End time of the log to be searched, which is a Unix timestamp in milliseconds
|
String |
getTopicId()
Get - The ID of the log topic to be searched for.
|
MultiTopicSearchInformation[] |
getTopics()
Get - The IDs of the log topics (up to 20) to be searched for.
|
Boolean |
getUseNewAnalysis()
Get If the value is `true`, the new response method will be used, and the output parameters `AnalysisRecords` and `Columns` will be valid.
|
void |
setContext(String Context)
Set Pass the Context value returned by the last API call to retrieve more subsequent logs.
|
void |
setFrom(Long From)
Set Start time of the log to be searched, which is a Unix timestamp in milliseconds
|
void |
setLimit(Long Limit)
Set Specifies the number of raw logs returned in a single query, default is 100, maximum is 1000.
|
void |
setQuery(String Query)
Set Search and analysis statement.
|
void |
setSamplingRate(Float SamplingRate)
Set Indicates whether to sample raw logs before statistical analysis (`Query` includes SQL statements).
|
void |
setSort(String Sort)
Set Time order of the logs returned.
|
void |
setSyntaxRule(Long SyntaxRule)
Set Retrieval syntax rule, default is 0, recommended to use 1 (CQL syntax).0: Lucene syntax, 1: CQL syntax.
|
void |
setTo(Long To)
Set End time of the log to be searched, which is a Unix timestamp in milliseconds
|
void |
setTopicId(String TopicId)
Set - The ID of the log topic to be searched for.
|
void |
setTopics(MultiTopicSearchInformation[] Topics)
Set - The IDs of the log topics (up to 20) to be searched for.
|
void |
setUseNewAnalysis(Boolean UseNewAnalysis)
Set If the value is `true`, the new response method will be used, and the output parameters `AnalysisRecords` and `Columns` will be valid.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public SearchLogRequest()
public SearchLogRequest(SearchLogRequest source)
public Long getFrom()
public void setFrom(Long From)
From
- Start time of the log to be searched, which is a Unix timestamp in millisecondspublic Long getTo()
public void setTo(Long To)
To
- End time of the log to be searched, which is a Unix timestamp in millisecondspublic String getQuery()
|
and SQL statement when log analysis is not required.
Queries all logs using * or an empty string |
and SQL statement when log analysis is not required.
Queries all logs using * or an empty stringpublic void setQuery(String Query)
|
and SQL statement when log analysis is not required.
Queries all logs using * or an empty stringQuery
- Search and analysis statement. Maximum length: 12 KB
A statement is in the format of [search criteria] | [SQL statement]. You can omit the pipe symbol |
and SQL statement when log analysis is not required.
Queries all logs using * or an empty stringpublic Long getSyntaxRule()
public void setSyntaxRule(Long SyntaxRule)
SyntaxRule
- Retrieval syntax rule, default is 0, recommended to use 1 (CQL syntax).0: Lucene syntax, 1: CQL syntax.
For detailed explanation, refer to Retrieve Syntax Rulespublic String getTopicId()
public void setTopicId(String TopicId)
TopicId
- - The ID of the log topic to be searched for. Only one log topic can be specified.
- To search for multiple log topics at a time, use the `Topics` parameter.public MultiTopicSearchInformation[] getTopics()
public void setTopics(MultiTopicSearchInformation[] Topics)
Topics
- - The IDs of the log topics (up to 20) to be searched for.
- To search for a single log topic, use the `TopicId` parameter.
- You cannot use both `TopicId` and `Topics`.public Long getLimit()
public void setLimit(Long Limit)
Limit
- Specifies the number of raw logs returned in a single query, default is 100, maximum is 1000. To obtain subsequent logs, use the Context parameter.Note:* This is only valid when the search and analysis statement (Query) does not contain SQL* Method for specifying SQL result count refers to SQL LIMIT Syntaxpublic String getSort()
public void setSort(String Sort)
Sort
- Time order of the logs returned. Valid values: `asc` (ascending); `desc`: (descending). Default value: `desc`
Notes:
This parameter is valid only when the query statement (`Query`) does not contain an SQL statement.
To sort the analysis results, see SQL ORDER BY Syntax.public String getContext()
public void setContext(String Context)
Context
- Pass the Context value returned by the last API call to retrieve more subsequent logs. A total of up to 10,000 raw logs can be obtained, with an expiration time of 1 hour.Note:* When passing this parameter, do not modify any other parameters except for this one* Only applicable for single log topic retrieval. When retrieving multiple log topics, use the Context in Topics.* This is only valid when the retrieval analysis statement (Query) does not contain SQL. For obtaining subsequent SQL results, refer to SQL LIMIT Syntaxpublic Float getSamplingRate()
public void setSamplingRate(Float SamplingRate)
SamplingRate
- Indicates whether to sample raw logs before statistical analysis (`Query` includes SQL statements).
`0`: Auto-sample.
`0-1`: Sample by the specified sample rate, such as `0.02`.
`1`: Precise analysis without sampling.
Default value: `1`public Boolean getUseNewAnalysis()
public void setUseNewAnalysis(Boolean UseNewAnalysis)
UseNewAnalysis
- If the value is `true`, the new response method will be used, and the output parameters `AnalysisRecords` and `Columns` will be valid.
If the value is `false`, the old response method will be used, and the output parameters `AnalysisResults` and `ColNames` will be valid.
The two response methods differ slightly in terms of encoding format. You are advised to use the new method (`true`).Copyright © 2024. All rights reserved.