module Elastic::SiteSearch::Client::Clickthrough
A Clickthrough
represents a user clicking on a full-text search result.
If you are routing searches through your own server instead of executing them client-side with the Site Search
JavaScript API, you will need to record clickthroughs yourself.
Public Instance Methods
log_clickthrough(engine_id, document_type, q, id)
click to toggle source
Log a clickthrough for a Document
.
@param [String] engine_id the Engine
slug or ID @param [String] document_type the DocumentType
slug or ID @param [String] q the query that generated the search result @param [String] id the external_id or ID of the Document
# File lib/elastic/site-search/client.rb, line 509 def log_clickthrough(engine_id, document_type, q, id) post( "engines/#{engine_id}/document_types/#{document_type}/analytics/log_clickthrough.json", {:q => q, :id => id} ) end