Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 11008 invoked from network); 20 Oct 2009 21:03:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Oct 2009 21:03:54 -0000 Received: (qmail 28458 invoked by uid 500); 20 Oct 2009 21:03:52 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 28381 invoked by uid 500); 20 Oct 2009 21:03:52 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 28371 invoked by uid 99); 20 Oct 2009 21:03:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Oct 2009 21:03:52 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of natehoward1@gmail.com designates 209.85.160.46 as permitted sender) Received: from [209.85.160.46] (HELO mail-pw0-f46.google.com) (209.85.160.46) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Oct 2009 21:03:49 +0000 Received: by pwi12 with SMTP id 12so867065pwi.5 for ; Tue, 20 Oct 2009 14:03:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=GeZdwDJ5teK4lx/Yv8A5EWfjjfb/xMStvyxIYPiyVRI=; b=jlIsarXJUrGdDiQwNgCEmk9uyBNrJ3jBCHHnJgAOvl0d4H/NVenJN5I9bfAASn3aL1 G5rpE+OxgKcwJ980NOfgjFNVhdBFp1E9F9kRmRR+OsXx/I6t7oIlqh95fHCCHlOsMoCH fh9Yq1qUdmcLknV3Cu05CDdrVjk63RyEBpLSk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=skLgBuvpIWUWQExnw2aNwxLB3hf7c7g8/j3qbz2qr9Pua/i3O70usUIpdYHkpNrqaa LUkHlSywXa8WzAgnkPJFY3rp3x5fWm/+zMI3zg9klSu3zIxjY92aaZ9jAR4oWCiNIm4O dn0iS86x1syMVdvRSVEGhf+bYXjv4fDT6mWws= MIME-Version: 1.0 Received: by 10.115.61.16 with SMTP id o16mr10226270wak.15.1256072609715; Tue, 20 Oct 2009 14:03:29 -0700 (PDT) Date: Tue, 20 Oct 2009 14:03:29 -0700 Message-ID: <4ad1ca1b0910201403h1397c647yb43f11d0e3d51684@mail.gmail.com> Subject: Hits and TopDoc From: Nathan Howard To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=0016e64beb02b6d513047664314f --0016e64beb02b6d513047664314f Content-Type: text/plain; charset=ISO-8859-1 This is sort of related to the above question, but I'm trying to update some (now depricated) Java/Lucene code that I've become aware of once we started using 2.4.1 (we were previously using 2.3.2): Hits results = MultiSearcher.search(Query)); int start = currentPage * resultsPerPage; int stop = (currentPage + 1) * resultsPerPage(); for(int x = start; (x < searchResults.length()) && (x < stop); x++) { Document doc = searchResults.doc(x); // do search post-processing with the Document } Results per page is normally small (10ish or so). I'm having difficulty figuring out how to get TopDocs to replicate this paging functionality (which the application must maintain). Thanks in advance! Nathan --0016e64beb02b6d513047664314f--