Method: projects.locations.collections.engines.completionConfig.removeSuggestion

為使用者移除搜尋引擎中的搜尋記錄建議。這麼做會從該使用者的「AdvancedCompleteQueryResponse.recent_search_suggestions」中移除建議。如果使用者再次搜尋相同的建議,系統會覆寫新記錄,並再次建議該項目。

HTTP 要求

POST https://discoveryengine.googleapis.com/v1alpha/{completionConfig=projects/*/locations/*/collections/*/engines/*/completionConfig}:removeSuggestion

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
completionConfig

string

這是必要旗標,要移除搜尋記錄建議的父項引擎資源名稱的 completionConfig,例如 projects/*/locations/global/collections/default_collection/engines/*/completionConfig

要求主體

要求主體包含下列結構的資料:

JSON 表示法
{
  "userPseudoId": string,
  "userInfo": {
    object (UserInfo)
  },
  "removeTime": string,

  // Union field suggestion can be only one of the following:
  "searchHistorySuggestion": string,
  "removeAllSearchHistorySuggestions": boolean
  // End of list of possible types for union field suggestion.
}
欄位
userPseudoId

string

這是必要旗標,用於追蹤訪客的專屬 ID。舉例來說,這項功能可以透過 HTTP Cookie 實作,應能識別單一裝置上的訪客。訪客登入或登出網站時,這個專屬 ID 不應變更。

這個欄位「不得」有固定值,例如 unknown_visitor

這個 ID 應與 UserEvent.user_pseudo_idSearchRequest.user_pseudo_id 相同。

這個欄位必須是 UTF-8 編碼的字串,長度上限為 128 個字元。

userInfo

object (UserInfo)

(選用步驟) 使用者的相關資訊。

這項資訊應與 UserEvent.user_infoSearchRequest.user_info 的 ID 資訊相同。

removeTime

string (Timestamp format)

這是必要旗標,建議移除的時間。如未設定,系統會使用目前時間。

使用 RFC 3339,產生的輸出內容一律會經過 Z 標準化,並使用 0、3、6 或 9 個小數點後位數。系統也接受「Z」以外的偏移量。例如:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

聯集欄位 suggestion。要移除的建議。suggestion 只能是下列其中一項:
searchHistorySuggestion

string

要移除的搜尋記錄建議。

removeAllSearchHistorySuggestions

boolean

移除使用者的所有搜尋記錄建議。

回應主體

如果成功,回應主體會留白。

授權範圍

需要下列其中一種 OAuth 範圍:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/discoveryengine.readwrite
  • https://www.googleapis.com/auth/discoveryengine.assist.readwrite

詳情請參閱Authentication Overview