Required. The natural language text query for knowledge search.
↳ conversation_profile
string
Required. The conversation profile used to configure the search. Format:projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>.
↳ session_id
string
Required. The ID of the search session. The session_id can be combined with Dialogflow V3 Agent ID retrieved from conversation profile or on its own to identify a search session. The search history of the same session will impact the search result. It's up to the API caller to choose an appropriateSession ID. It can be a random number or some type of session identifiers (preferably hashed). The length must not exceed 36 characters.
↳ conversation
string
Optional. The conversation (between human agent and end user) where the search request is triggered. Format:projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.
↳ latest_message
string
Optional. The name of the latest conversation message when the request is triggered. Format:projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>.
Optional. Information about the end-user to improve the relevance and accuracy of generative answers. This will be interpreted and used by a language model, so, for good results, the data should be self-descriptive, and in a simple structure. Example:json { "subscription plan": "Business Premium Plus", "devices owned": [ {"model": "Google Pixel 7"}, {"model": "Google Pixel Tablet"} ] }
The session_id can be combined with Dialogflow V3 Agent ID retrieved from
conversation profile or on its own to identify a search session. The search
history of the same session will impact the search result. It's up to the
API caller to choose an appropriateSession ID. It can be a random number
or some type of session identifiers (preferably hashed). The length must
not exceed 36 characters.
Returns
Type
Description
string
setSessionId
Required. The ID of the search session.
The session_id can be combined with Dialogflow V3 Agent ID retrieved from
conversation profile or on its own to identify a search session. The search
history of the same session will impact the search result. It's up to the
API caller to choose an appropriateSession ID. It can be a random number
or some type of session identifiers (preferably hashed). The length must
not exceed 36 characters.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getConversation
Optional. The conversation (between human agent and end user) where the
search request is triggered. Format:projects/<Project
ID>/locations/<Location ID>/conversations/<Conversation ID>.
Returns
Type
Description
string
setConversation
Optional. The conversation (between human agent and end user) where the
search request is triggered. Format:projects/<Project
ID>/locations/<Location ID>/conversations/<Conversation ID>.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getLatestMessage
Optional. The name of the latest conversation message when the request is
triggered.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Dialogflow V2 Client - Class SearchKnowledgeRequest (2.1.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.2 (latest)](/php/docs/reference/cloud-dialogflow/latest/V2.SearchKnowledgeRequest)\n- [2.1.1](/php/docs/reference/cloud-dialogflow/2.1.1/V2.SearchKnowledgeRequest)\n- [2.0.1](/php/docs/reference/cloud-dialogflow/2.0.1/V2.SearchKnowledgeRequest)\n- [1.17.2](/php/docs/reference/cloud-dialogflow/1.17.2/V2.SearchKnowledgeRequest)\n- [1.16.0](/php/docs/reference/cloud-dialogflow/1.16.0/V2.SearchKnowledgeRequest)\n- [1.15.1](/php/docs/reference/cloud-dialogflow/1.15.1/V2.SearchKnowledgeRequest)\n- [1.14.0](/php/docs/reference/cloud-dialogflow/1.14.0/V2.SearchKnowledgeRequest)\n- [1.13.0](/php/docs/reference/cloud-dialogflow/1.13.0/V2.SearchKnowledgeRequest)\n- [1.12.3](/php/docs/reference/cloud-dialogflow/1.12.3/V2.SearchKnowledgeRequest)\n- [1.11.0](/php/docs/reference/cloud-dialogflow/1.11.0/V2.SearchKnowledgeRequest)\n- [1.10.2](/php/docs/reference/cloud-dialogflow/1.10.2/V2.SearchKnowledgeRequest)\n- [1.9.0](/php/docs/reference/cloud-dialogflow/1.9.0/V2.SearchKnowledgeRequest)\n- [1.8.0](/php/docs/reference/cloud-dialogflow/1.8.0/V2.SearchKnowledgeRequest)\n- [1.7.2](/php/docs/reference/cloud-dialogflow/1.7.2/V2.SearchKnowledgeRequest)\n- [1.6.0](/php/docs/reference/cloud-dialogflow/1.6.0/V2.SearchKnowledgeRequest)\n- [1.5.0](/php/docs/reference/cloud-dialogflow/1.5.0/V2.SearchKnowledgeRequest)\n- [1.4.0](/php/docs/reference/cloud-dialogflow/1.4.0/V2.SearchKnowledgeRequest)\n- [1.3.2](/php/docs/reference/cloud-dialogflow/1.3.2/V2.SearchKnowledgeRequest)\n- [1.2.0](/php/docs/reference/cloud-dialogflow/1.2.0/V2.SearchKnowledgeRequest)\n- [1.1.1](/php/docs/reference/cloud-dialogflow/1.1.1/V2.SearchKnowledgeRequest)\n- [1.0.1](/php/docs/reference/cloud-dialogflow/1.0.1/V2.SearchKnowledgeRequest) \nReference documentation and code samples for the Google Cloud Dialogflow V2 Client class SearchKnowledgeRequest.\n\nThe request message for\n[Conversations.SearchKnowledge](/php/docs/reference/cloud-dialogflow/latest/V2.Client.ConversationsClient#_Google_Cloud_Dialogflow_V2_Client_ConversationsClient__searchKnowledge__).\n\nGenerated from protobuf message `google.cloud.dialogflow.v2.SearchKnowledgeRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dialogflow \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getParent\n\nRequired. The parent resource contains the conversation profile\nFormat: 'projects/\n\n\n### setParent\n\nRequired. The parent resource contains the conversation profile\nFormat: 'projects/\n\n\n### getQuery\n\nRequired. The natural language text query for knowledge search.\n\n### hasQuery\n\n### clearQuery\n\n### setQuery\n\nRequired. The natural language text query for knowledge search.\n\n### getConversationProfile\n\nRequired. The conversation profile used to configure the search.\n\nFormat: `projects/\u003cProject ID\u003e/locations/\u003cLocation\nID\u003e/conversationProfiles/\u003cConversation Profile ID\u003e`.\n\n### setConversationProfile\n\nRequired. The conversation profile used to configure the search.\n\nFormat: `projects/\u003cProject ID\u003e/locations/\u003cLocation\nID\u003e/conversationProfiles/\u003cConversation Profile ID\u003e`.\n\n### getSessionId\n\nRequired. The ID of the search session.\n\nThe session_id can be combined with Dialogflow V3 Agent ID retrieved from\nconversation profile or on its own to identify a search session. The search\nhistory of the same session will impact the search result. It's up to the\nAPI caller to choose an appropriate `Session ID`. It can be a random number\nor some type of session identifiers (preferably hashed). The length must\nnot exceed 36 characters.\n\n### setSessionId\n\nRequired. The ID of the search session.\n\nThe session_id can be combined with Dialogflow V3 Agent ID retrieved from\nconversation profile or on its own to identify a search session. The search\nhistory of the same session will impact the search result. It's up to the\nAPI caller to choose an appropriate `Session ID`. It can be a random number\nor some type of session identifiers (preferably hashed). The length must\nnot exceed 36 characters.\n\n### getConversation\n\nOptional. The conversation (between human agent and end user) where the\nsearch request is triggered. Format: `projects/\u003cProject\nID\u003e/locations/\u003cLocation ID\u003e/conversations/\u003cConversation ID\u003e`.\n\n### setConversation\n\nOptional. The conversation (between human agent and end user) where the\nsearch request is triggered. Format: `projects/\u003cProject\nID\u003e/locations/\u003cLocation ID\u003e/conversations/\u003cConversation ID\u003e`.\n\n### getLatestMessage\n\nOptional. The name of the latest conversation message when the request is\ntriggered.\n\nFormat: `projects/\u003cProject ID\u003e/locations/\u003cLocation\nID\u003e/conversations/\u003cConversation ID\u003e/messages/\u003cMessage ID\u003e`.\n\n### setLatestMessage\n\nOptional. The name of the latest conversation message when the request is\ntriggered.\n\nFormat: `projects/\u003cProject ID\u003e/locations/\u003cLocation\nID\u003e/conversations/\u003cConversation ID\u003e/messages/\u003cMessage ID\u003e`.\n\n### getQuerySource\n\nOptional. The source of the query in the request.\n\n### setQuerySource\n\nOptional. The source of the query in the request.\n\n### getEndUserMetadata\n\nOptional. Information about the end-user to improve the relevance and\naccuracy of generative answers.\n\nThis will be interpreted and used by a language model, so, for good\nresults, the data should be self-descriptive, and in a simple structure.\nExample: \n\n {\n \"subscription plan\": \"Business Premium Plus\",\n \"devices owned\": [\n {\"model\": \"Google Pixel 7\"},\n {\"model\": \"Google Pixel Tablet\"}\n ]\n }\n\n### hasEndUserMetadata\n\n### clearEndUserMetadata\n\n### setEndUserMetadata\n\nOptional. Information about the end-user to improve the relevance and\naccuracy of generative answers.\n\nThis will be interpreted and used by a language model, so, for good\nresults, the data should be self-descriptive, and in a simple structure.\nExample: \n\n {\n \"subscription plan\": \"Business Premium Plus\",\n \"devices owned\": [\n {\"model\": \"Google Pixel 7\"},\n {\"model\": \"Google Pixel Tablet\"}\n ]\n }\n\n### getSearchConfig\n\nOptional. Configuration specific to search queries with data stores.\n\n### hasSearchConfig\n\n### clearSearchConfig\n\n### setSearchConfig\n\nOptional. Configuration specific to search queries with data stores.\n\n### getExactSearch\n\nOptional. Whether to search the query exactly without query rewrite.\n\n### setExactSearch\n\nOptional. Whether to search the query exactly without query rewrite."]]