From 9cc2d899e777b45b1e289f58b9e8e05099de6b3f Mon Sep 17 00:00:00 2001 From: Eric Zhang <31218485+16BitNarwhal@users.noreply.github.com> Date: Wed, 26 Jun 2024 19:52:39 -0400 Subject: [PATCH] Fix rest-api.md (#2540) --- docs/rest-api.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/rest-api.md b/docs/rest-api.md index 06c542d09..dd5aacc00 100644 --- a/docs/rest-api.md +++ b/docs/rest-api.md @@ -60,7 +60,7 @@ The search query endpoint is `api/v1.0/indexes/{index_name}/search?query={query} Path variables: -- `index`: The index name to query. Default is "msmarco-v1-passage" +- `index_name`: The index name to query. Default is "msmarco-v1-passage" Query parameters: @@ -118,11 +118,16 @@ Here's an example of getting the document of the top candidate from the above ex curl -X GET "http://localhost:8080/api/v1.0/indexes/msmarco-v2.1-doc/documents/msmarco_v2.1_doc_15_390497775" ``` -Output is an object containing the 'cached' property +Output is an object of the same format as a candidate from search ```json { - "cached": true + "doc": { + "url": "https://diabetestalk.net/blood-sugar/conversion-of-carbohydrates-to-glucose", + "title": "Conversion Of Carbohydrates To Glucose | DiabetesTalk.Net", + "headings": "...", + "body": "..." + } } ``` @@ -140,11 +145,6 @@ Output is an object containing the 'cached' property ```json { - "doc": { - "url": "https://diabetestalk.net/blood-sugar/conversion-of-carbohydrates-to-glucose", - "title": "Conversion Of Carbohydrates To Glucose | DiabetesTalk.Net", - "headings": "...", - "body": "..." - } + "cached": true } ```