forked from jaeksoft/opensearchserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Synonyms: check
AlexandreToyer edited this page Sep 30, 2013
·
5 revisions
Use this API to check if a list of synonyms exists
Requirement: OpenSearchServer v1.5
URL: /services/rest/index/{index_name}/synonyms/{list_name}
Method: HEAD
URL parameters:
- index_name (required): The name of the index.
- list_name (required): The name of the list to check.
Returns HTTP code 200 if list exist, 404 otherwise.
The command failed. The reason is provided in the content.
HTTP code: 500
Using CURL:
curl -XHEAD http://localhost:8080/services/rest/index/my_index/synonyms/my_listUsing jQuery:
$.ajax({
type: "HEAD",
dataType: "json",
url: "http://localhost:8080/services/rest/index/my_index/synonyms/my_list"
}).done(function (data) {
console.log(data);
});