Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MaxResultsPerPage is the default max number of search results per page MaxResultsPerPage = 10 // MaxResults is the maximum number of search results MaxResults = 100 )
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
NewService creates a Google custom search service
Types ¶
type Connector ¶
func (*Connector) CreateExecution ¶
type Result ¶
type Result struct { // Title: The title of the search result, in plain text. Title string `json:"title"` // Link: The full URL to which the search result is pointing, e.g. // http://www.example.com/foo/bar. Link string `json:"link"` // Snippet: The snippet of the search result, in plain text. Snippet string `json:"snippet"` // LinkText: The scraped text of the search web page result, in plain text. LinkText string `json:"link_text"` // LinkHTML: The full raw HTML of the search web page result. LinkHTML string `json:"link_html"` }
type SearchInput ¶
type SearchInput struct { // Query: The search query. Query string `json:"query"` // TopK: The number of search results to return. TopK *int `json:"top_k,omitempty"` // IncludeLinkText: Whether to include the scraped text of the search web page result. IncludeLinkText *bool `json:"include_link_text,omitempty"` // IncludeLinkHTML: Whether to include the scraped HTML of the search web page result. IncludeLinkHTML *bool `json:"include_link_html,omitempty"` }
SearchInput defines the input of the search task
type SearchOutput ¶
type SearchOutput struct { // Results: The search results. Results []*Result `json:"results"` }
SearchOutput defines the output of the search task
Click to show internal directories.
Click to hide internal directories.