Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
API | Operation Description |
Search directories and files | |
Used to continue retrieving search results | |
Used to delete search task |
QCloudSMHInitiateSearchRequest *req = [QCloudSMHInitiateSearchRequest new];// Media Library ID, required parameterreq.libraryId = @"libraryId"// Space ID, if the media library is in single-tenant mode, this parameter is fixed as a hyphen (-); if the media library is in multi-tenant mode, you must specify this parameterreq.spaceId = @"spaceId";// Search scope, specify the directory to search, for example, to search the root directory, you can specify an empty string, "/", or leave the field unspecifiedreq.scope = scopeDir.totalPath;// Search keywords, multiple keywords can be separated by spaces, the relationship between keywords is "OR" with priority display of projects matching more keywords;req.keyword = @"keyWord";// Search type, string or string array QCloudSMHSearchTypereq.searchTypes = @[@(type)];[req setFinishBlock:^(QCloudSMHSearchListInfo *_Nullable result, NSError *_Nullable error) {}];[[QCloudSMHService defaultSMHService] initSearch:req];
QCloudSMHResumeSearchRequest *req = [QCloudSMHResumeSearchRequest new];// Media Library ID, required parameterreq.libraryId = self.userModel.libraryId;// Space ID, if the media library is in single-tenant mode, this parameter is fixed as a hyphen (-); if the media library is in multi-tenant mode, you must specify this parameterreq.spaceId = scopeDir.teamInfo.spaceId;// Search task ID returned during search initializationreq.searchId = searchId;// Pagination identifier, the nextMarker field returned when creating a search task or continuing to retrieve search results;req.nextMarker = nextMarker;[req setFinishBlock:^(QCloudSMHSearchListInfo *_Nullable result, NSError *_Nullable error) {}];[[QCloudSMHService defaultSMHService] resumeSearch:req];
QCloudSMHAbortSearchRequest *req = [QCloudSMHAbortSearchRequest new];// Media Library ID, required parameterreq.libraryId = self.userModel.libraryId;// Space ID, if the media library is in single-tenant mode, this parameter is fixed as a hyphen (-); if the media library is in multi-tenant mode, you must specify this parameterreq.spaceId = scopeDir.teamInfo.spaceId;// Search task IDreq.searchId = @"searchId";[req setFinishBlock:^(QCloudSMHSearchListInfo *_Nullable result, NSError *_Nullable error) {if (error) {[liveData postError:error];return;} else {[liveData postValueAndComplete:searchId];}}];[[QCloudSMHService defaultSMHService] abortSearch:req];
フィードバック