forked from jaeksoft/opensearchserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Auto completion: list
AlexandreToyer edited this page Sep 30, 2013
·
7 revisions
Use this API to list the auto-completion items.
Requirement: OpenSearchServer v1.5
URL: /services/rest/index/{index_name}/autocompletion/
Method: GET
Header:
-
Accept (optional returned type):
application/jsonorapplication/xml
URL parameters:
- index_name (required): The name of the index.
The list of auto-completion items.
HTTP code: 200
Content (application/json):
{
"successful": true,
"info": "3 item(s) found",
"items": [
"my_products",
"my_categories",
]
}The build failed. The reason is provided in the content.
HTTP code: 500
Using CURL:
curl -XGET http://localhost:8080/services/rest/index/my_index/autocompletion/Using jQuery:
$.ajax({
type: "GET",
dataType: "json",
url: "http://localhost:8080/services/rest/index/my_index/autocompletion/"
}).done(function (data) {
console.log(data);
});