module Elastic::SiteSearch::Client::Domain
A Domain
represents a host in a crawler-based Engine
. Domains are only relevant to crawler-base engines, but you can manipulate them through the REST API.
Public Instance Methods
crawl_url(engine_id, domain_id, url)
click to toggle source
Request
to add or update a URL on a Domain
. The host of the URL must match the host of the Domain
.
@param [String] engine_id the Engine
slug or ID @param [String] domain_id the Domain
ID @param [String] url the URL to crawl
# File lib/elastic/site-search/client.rb, line 492 def crawl_url(engine_id, domain_id, url) put("engines/#{engine_id}/domains/#{domain_id}/crawl_url.json", {:url => url}) end
create_domain(engine_id, url)
click to toggle source
# File lib/elastic/site-search/client.rb, line 474 def create_domain(engine_id, url) post("engines/#{engine_id}/domains.json", {:domain => {:submitted_url => url}}) end
destroy_domain(engine_id, domain_id)
click to toggle source
# File lib/elastic/site-search/client.rb, line 478 def destroy_domain(engine_id, domain_id) delete("engines/#{engine_id}/domains/#{domain_id}.json") end
domain(engine_id, domain_id)
click to toggle source
# File lib/elastic/site-search/client.rb, line 470 def domain(engine_id, domain_id) get("engines/#{engine_id}/domains/#{domain_id}.json") end
domains(engine_id)
click to toggle source
# File lib/elastic/site-search/client.rb, line 466 def domains(engine_id) get("engines/#{engine_id}/domains.json") end
recrawl_domain(engine_id, domain_id)
click to toggle source
Trigger a recrawl request for a Domain
. Note that this will fail if you have exceeded your recrawl limit.
# File lib/elastic/site-search/client.rb, line 483 def recrawl_domain(engine_id, domain_id) put("engines/#{engine_id}/domains/#{domain_id}/recrawl.json") end