Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
remove artifical max_fetch cap.
  • Loading branch information
Robert Newson committed Aug 3, 2009
1 parent 56acf28 commit c68d16d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions src/main/java/com/github/rnewson/couchdb/lucene/Config.java
Expand Up @@ -51,8 +51,6 @@ final class Config {

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);
Expand Down
Expand Up @@ -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";
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit c68d16d

Please sign in to comment.