This document describes the Cloud Search API v2.0 provided by NHN Cloud Search.
[Request]
URI Information
Environment | URI |
---|---|
REAL | https://kr1-search.api.nhncloudservice.com |
Path Parameter Information
Name | Description |
---|---|
appKey | Appkey issued from the console |
serviceId | A random name for the user |
If you run full indexing, previously indexed files will disappear.
You must proceed in the start-index-end order.
[Request]
URI Information
Method | URI |
---|---|
POST | /indexing/v2.0/appkeys/{{appKey}}/serviceids/{{serviceId}}/indexing/full/begin |
[Response]
Response Body
{}
[Request]
URI Information
Method | URI |
---|---|
POST | /indexing/v2.0/appkeys/{{appKey}}/serviceids/{{serviceId}}/indexing/full |
BODY Information (example)
[
{
"action": "add",
"id": "id-1",
"fields": {
"title": "Awesome!! You're in first place!!"
}
}
]
[Response]
Response body (example)
{
"id": 1
}
[Request]
URI Information
Method | URI |
---|---|
POST | /indexing/v2.0/appkeys/{{appKey}}/serviceids/{{serviceId}}/indexing/full/end |
[Response]
Response Body
{}
[Request]
URI Information
Method | URI |
---|---|
POST | /indexing/v2.0/appkeys/{{appKey}}/serviceids/{{serviceId}}/indexing/full/cancel |
[Response]
Response Body
{}
The index is updated if an existing ID exists, or added if it does not.
[Request]
URI Information
Method | URI |
---|---|
POST | /indexing/v2.0/appkeys/{{appKey}}/serviceids/{{serviceId}}/indexing |
BODY Information (example)
[
{
"action": "add",
"id": "id-2",
"fields": {
"title": "Yay!! You're in second place!!"
}
}
]
[Response]
Response body (example)
{
"id": 2
}
Displays the index results.
[Request]
URI Information
Method | URI |
---|---|
GET | /indexing/v2.0/appkeys/{{appKey}}/serviceids/{{serviceId}}/indexing_log?id=1 |
Parameter Information
Name | Description |
---|---|
id | Indexing ID |
[Response]
Response body (example)
{
"total_doc_count" : 3,
"request_time" : "2024-01-30T14:12:01",
"file_name" : "payload-1.json",
"total_index_file_size" : 355,
"file_size" : 355,
"status" : 4
}
You can use the index to search for fields.
[Request]
URI Information (example)
Method | URI |
---|---|
GET | /indexing/v2.0/appkeys/{{appKey}}/serviceids/{{serviceId}}/search?q=&q_option=and,title*1.0&start=1&size=10&passage.title=180 |
Parameter Information
Name | Description |
---|---|
start | Start number (required) |
size | Size (required) |
q_option | AND, OR, BOOLEAN, field * weight (required) |
return | Output the results |
q | Query |
sort | Sorting |
passage.* | Result length |
summary.* | Summary |
filter_and | Filter And |
filter_or | Filter Or |
highlight | Highlight |
doc_weight_ratio | Weight |
[Response]
Response body (example)
{
"message": {
"result": {
"total": 2,
"query": "",
"start": 1,
"itemList": {
"item": [
{
"_ID": "id-1",
"_RANK": "0",
"_relevance": 100,
"title": "Awesome!! We're in first place!!"
},
{
"_ID": "id-2",
"_RANK": "0",
"_relevance": 100,
"title": "Awesome!! You're in second place!!"
}
]
},
"status": {
"code": 200,
"message": "OK"
},
"itemCount": 2
},
"meta": {
"timezone": "+09:00"
}
}
}
Statistics show the number of total queries and queries without results by date.
[Request]
URI Information (example)
Method | URI |
---|---|
GET | /stats/v2.0/appkeys/{{appKey}}/serviceids/{{serviceId}}/stats?kind=total_query_count&date=2024-01-29 |
Parameter Information
Name | Description |
---|---|
kind | total_query_count - Total number of queries |
no_result_query_count - Number of queries without results | |
date | Date |
[Response]
Response body (example)
[["", 13]]