Permalink
Browse files

remove artifical max_fetch cap.

  • Loading branch information...
1 parent 56acf28 commit c68d16d0968b1e58445f8cba8fca1678d2cc7516 Robert Newson committed Aug 3, 2009
@@ -51,8 +51,6 @@
static final String DB_PASSWORD = System.getProperty("couchdb.password");
- static final int MAX_LIMIT = Integer.getInteger("couchdb.lucene.max_fetch", 250);
-
static final int COMMIT_MIN = Integer.getInteger("couchdb.lucene.commit.min", 5 * 1000);
static final int COMMIT_MAX = Integer.getInteger("couchdb.lucene.commit.max", 5 * 60 * 1000);
@@ -92,7 +92,7 @@ public SearchRequest(final JSONObject obj, final String viewsig) throws ParseExc
this.include_docs = query.optBoolean("include_docs", false);
this.rewrite_query = query.optBoolean("rewrite", false);
this.callback = query.optString("callback", null);
-
+
// Negotiate Content-Type of response.
if (headers.optString("Accept").indexOf("application/json") != -1) {
this.contentType = "application/json";
@@ -145,10 +145,6 @@ public SearchRequest(final JSONObject obj, final String viewsig) throws ParseExc
}
public String execute(final IndexSearcher searcher) throws IOException {
- // Decline requests over MAX_LIMIT.
- if (limit > Config.MAX_LIMIT) {
- return "{\"code\":400,\"body\":\"max limit was exceeded.\"}";
- }
// Return "304 - Not Modified" if etag matches.
final String etag = getETag(searcher);
if (!debug && etag.equals(this.ifNoneMatch)) {

0 comments on commit c68d16d

Please sign in to comment.