forked from jaeksoft/opensearchserver
-
Notifications
You must be signed in to change notification settings - Fork 0
WEB crawler: start
AlexandreToyer edited this page Sep 30, 2013
·
3 revisions
The WEB crawler index web site based on wildcards patterns (exclusion and inclusion).
Use this API to start the crawler.
Requirement: OpenSearchServer v1.5
URL: /services/rest/index/{index_name}/crawler/web/run
Method: PUT
Header (optional returned type):
- Accept:
application/json - Accept:
application/xml
URL parameters:
- index_name (required): The name of the index.
- once (optional): Set it to true to make only one crawl session.
The crawl has been executed.
HTTP code: 200
Content (application/json):
{
"successful": true,
"info": "STARTING"
}The crawl failed. The reason is provided in the content.
HTTP code: 500
Using CURL: Simple call:
curl -XPUT http://localhost:8080/services/rest/index/my_index/crawler/web/runUsing jQuery:
$.ajax({
type: "PUT",
dataType: "json",
url: "http://localhost:8080/services/rest/index/my_index/crawler/web/run"
}).done(function (data) {
console.log(data);
});