Permalink
Browse files

Improve README.

  • Loading branch information...
1 parent 3a4e9eb commit 546f74417ac2fc3d026a2afec6bfe75d964ba450 Robert Newson committed Mar 3, 2013
Showing with 21 additions and 12 deletions.
  1. +21 −12 README.md
View
@@ -61,18 +61,6 @@ fti=/path/to/python /path/to/couchdb-lucene/tools/couchdb-external-hook.py
_fti = {couch_httpd_external, handle_external_req, <<"fti">>}
</pre>
-<h2>For CouchDB versions from 1.1 onward</h2>
-<pre>
-[httpd_global_handlers]
-_fti = {couch_httpd_proxy, handle_proxy_req, &lt;&lt;"http://127.0.0.1:5985"&gt;&gt;}
-</pre>
-
-<b>Note:</b> The urls via the proxy have a different form:
-
-<pre>http://127.0.0.1:5984/_fti/local/db1/_design/cl-test/idx?q=hello</pre>
-
-The "local" matches the name of the key from <code>couchdb-lucene.ini</code>.
-
<h2>Hook options</h2>
<table>
@@ -82,6 +70,12 @@ The "local" matches the name of the key from <code>couchdb-lucene.ini</code>.
<tr><td>--local-key</td><td>The key for the local couchdb instance as known to the couchdb-lucene server</td><td>local</td></tr>
</table>
+<h2>For CouchDB versions from 1.1 onward</h2>
+<pre>
+[httpd_global_handlers]
+_fti = {couch_httpd_proxy, handle_proxy_req, &lt;&lt;"http://127.0.0.1:5985"&gt;&gt;}
+</pre>
+
<h1>Configure couchdb-lucene</h1>
couchdb-lucene runs in a single, standalone JVM. As such, you can choose to locate your couchdb-lucene server on a different machine to couchdb if you wish, or keep it on the same machine, it's your call.
@@ -121,11 +115,18 @@ Here's an complete example of a design document with couchdb-lucene features:
Here are some example URL's for the given design document;
+<h2>CouchDB versions prior to 1.1</h2>
<pre>
http://localhost:5984/database/_fti/_design/foo/by_subject?q=hello
http://localhost:5984/database/_fti/_design/foo/by_content?q=hello
</pre>
+<h2>CouchDB versions from 1.1 onward</h2>
+<pre>
+http://localhost:5984/_fti/local/database/_design/foo/by_subject?q=hello
+http://localhost:5984/_fti/local/database/_design/foo/by_content?q=hello
+</pre>
+
A fulltext object contains multiple index view declarations. An index view consists of;
<dl>
@@ -466,12 +467,20 @@ All Dublin Core attributes are indexed and stored if detected in the attachment.
<h2>Examples</h2>
+<h2>CouchDB versions prior to 1.1</h2>
<pre>
http://localhost:5984/dbname/_fti/_design/foo/view_name?q=field_name:value
http://localhost:5984/dbname/_fti/_design/foo/view_name?q=field_name:value&sort=other_field
http://localhost:5984/dbname/_fti/_design/foo/view_name?debug=true&sort=billing_size&lt;long&gt;&q=body:document AND customer:[A TO C]
</pre>
+<h2>CouchDB versions from 1.1 onward</h2>
+<pre>
+http://localhost:5984/_fti/local/dbname/_design/foo/view_name?q=field_name:value
+http://localhost:5984/_fti/local/dbname/_design/foo/view_name?q=field_name:value&sort=other_field
+http://localhost:5984/_fti/local/dbname/_design/foo/view_name?debug=true&sort=billing_size&lt;long&gt;&q=body:document AND customer:[A TO C]
+</pre>
+
<h2>Search Results Format</h2>
The search result contains a number of fields at the top level, in addition to your search results.

0 comments on commit 546f744

Please sign in to comment.