Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

document Content-Type response negotiation

  • Loading branch information...
commit a4aa4e14376d615fa219bf45dbe68fb9830afe71 1 parent dea842a
@rnewson authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 README.md
View
6 README.md
@@ -260,7 +260,7 @@ You can perform all types of queries using Lucene's default <a href="http://luce
<dt>skip</dt><dd>the number of results to skip</dd>
<dt>include_docs</dt><dd>whether to include the source docs</dd>
<dt>stale=ok</dt><dd>If you set the <i>stale</i> option to <i>ok</i>, couchdb-lucene may not perform any refreshing on the index. Searches may be faster as Lucene caches important data (especially for sorting). A query without stale=ok will use the latest data committed to the index.</dd>
-<dt>debug</dt><dd>if false, a normal application/json response with results appears. if true, an pretty-printed HTML blob is returned instead.</dd>
+<dt>debug</dt><dd>if false, a normal response with results appears. if true, an pretty-printed HTML blob is returned instead.</dd>
<dt>rewrite</dt><dd>(EXPERT) if true, returns a json response with a rewritten query and term frequencies. This allows correct distributed scoring when combining the results from multiple nodes.</dd>
<dt>callback</dt><dd>Specify a JSONP callback wrapper. The full JSON result will be prepended with this parameter and also placed with parentheses."
</dl>
@@ -404,6 +404,10 @@ And the same with sorting;
}
</pre>
+<h3>Content-Type of response</h3>
+
+The Content-Type of the response is negotiated via the Accept request header like CouchDB itself. If the Accept header includes "application/json" then that is also the Content-Type of the response. If not, "text/plain;charset=utf-8" is used.
+
<h1>Fetching information about the index</h1>
Calling couchdb-lucene without arguments returns a JSON object with information about the <i>whole</i> index.
Please sign in to comment.
Something went wrong with that request. Please try again.