From 0fcf578780d63604e8f3a3049212f3484acbee63 Mon Sep 17 00:00:00 2001 From: Robert Newson Date: Sun, 26 Apr 2009 17:39:59 +0100 Subject: [PATCH] update docs. --- README.md | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3984d358..c66dc544 100644 --- a/README.md +++ b/README.md @@ -328,6 +328,28 @@ http://localhost:5984/dbname/_fti?debug=true&sort=billing_size&q=body:document A

Search Results Format

+The search result contains a number of fields at the top level, in addition to your search results. + +
+
q
The query that was executed.
+
etag
An opaque token that reflects the current version of the index. This value is also returned in an ETag header to facilitate HTTP caching.
+
skip
The number of initial matches that was skipped.
+
limit
The maximum number of results that can appear.
+
total_rows
The total number of matches for this query.
+
search_duration
The number of milliseconds spent performing the search.
+
fetch_duration
The number of milliseconds spent retrieving the documents.
+
rows
The search results object, described below.
+
+ +

The search results object

+ +
+
id
The unique identifier for this match.
+
score
The normalized score (0.0-1.0, inclusive) for this match
+
fields
All the fields that were stored with this match
+
doc
The original document from couch, if requested with include_docs=true
+
+ Here's an example of a JSON response without sorting;
@@ -340,11 +362,11 @@ Here's an example of a JSON response without sorting;
   "fetch_duration": 4,
   "rows":   [
         {
-      "_id": "hain-m-all_documents-257.",
+      "id": "hain-m-all_documents-257.",
       "score": 1.601625680923462
     },
         {
-      "_id": "hain-m-notes_inbox-257.",
+      "id": "hain-m-notes_inbox-257.",
       "score": 1.601625680923462
     }
   ]
@@ -355,7 +377,7 @@ And the same with sorting;
 
 
 {
-  "q": "+_db:enron +content:enron",
+  "q": "+content:enron",
   "skip": 0,
   "limit": 3,
   "total_rows": 176852,
@@ -374,7 +396,7 @@ And the same with sorting;
   ],
   "rows":   [
         {
-      "_id": "shankman-j-inbox-105.",
+      "id": "shankman-j-inbox-105.",
       "score": 0.6131107211112976,
       "sort_order":       [
         "enron",
@@ -382,7 +404,7 @@ And the same with sorting;
       ]
     },
         {
-      "_id": "shankman-j-inbox-8.",
+      "id": "shankman-j-inbox-8.",
       "score": 0.7492915391921997,
       "sort_order":       [
         "enron",
@@ -390,7 +412,7 @@ And the same with sorting;
       ]
     },
         {
-      "_id": "shankman-j-inbox-30.",
+      "id": "shankman-j-inbox-30.",
       "score": 0.507369875907898,
       "sort_order":       [
         "enron",