forked from jaeksoft/opensearchserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Synonyms: get
AlexandreToyer edited this page Sep 30, 2013
·
4 revisions
Use this API to retrieve all synonyms from a list
Requirement: OpenSearchServer v1.5
URL: /services/rest/index/{index_name}/synonyms/{list_name}
Method: GET
Header:
-
Accept (optional returned type):
application/jsonorapplication/xml
URL parameters:
- index_name (required): The name of the index.
- list_name (required): The name of the list for which retrieve synonyms from.
All synonymes from the list are returned. One group of synonyms by line, each synonym separated by a comma:
canapé,banquette,sofa
vaisselier,buffet
HTTP code: 200
Content (application/json):
The command failed. The reason is provided in the content.
HTTP code: 500
Using CURL:
curl -XGET http://localhost:8080/services/rest/index/my_index/synonyms/my_listUsing jQuery:
$.ajax({
type: "GET",
dataType: "json",
url: "http://localhost:8080/services/rest/index/my_index/synonyms/my_list"
}).done(function (data) {
console.log(data);
});