Permalink
Browse files

document that default search field is the _body field that attachment…

… text goes to [#4 state:resolved]
  • Loading branch information...
Robert Newson
Robert Newson committed Apr 1, 2009
1 parent fe20455 commit 39b22c826aa8bad905079f722413325c3981985b
Showing with 4 additions and 4 deletions.
  1. +1 −1 README.md
  2. +3 −3 src/main/java/com/github/rnewson/couchdb/lucene/Config.java
View
@@ -117,7 +117,7 @@ Couchdb-lucene uses <a href="http://lucene.apache.org/tika/">Apache Tika</a> to
<h1>Searching with couchdb-lucene</h1>
-You can perform all types of queries using Lucene's default <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">query syntax</a>. The following parameters can be passed for more sophisticated searches;
+You can perform all types of queries using Lucene's default <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">query syntax</a>. The _body field is searched by default which will include the extracted text from all attachments. The following parameters can be passed for more sophisticated searches;
<dl>
<dt>q</dt><dd>the query to run (e.g, subject:hello)</dd>
@@ -24,7 +24,9 @@
static final Analyzer ANALYZER = new StandardAnalyzer();
- static final String DEFAULT_FIELD = System.getProperty("couchdb.lucene.default_field", "body");
+ static final String BODY = "_body";
+
+ static final String DEFAULT_FIELD = BODY; //System.getProperty("couchdb.lucene.default_field", BODY);
static final QueryParser QP = new QueryParser(DEFAULT_FIELD, ANALYZER);
@@ -36,8 +38,6 @@
static final String SEQ = "_seq";
- static final String BODY = "_body";
-
static final String TITLE = "_title";
static final String AUTHOR = "_author";

0 comments on commit 39b22c8

Please sign in to comment.