Return-Path: Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: (qmail 35618 invoked from network); 2 Jul 2009 20:49:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Jul 2009 20:49:37 -0000 Received: (qmail 55828 invoked by uid 500); 2 Jul 2009 20:49:46 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 55759 invoked by uid 500); 2 Jul 2009 20:49:46 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 55747 invoked by uid 99); 2 Jul 2009 20:49:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jul 2009 20:49:46 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.69.42.181] (HELO radix.cryptio.net) (208.69.42.181) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jul 2009 20:49:36 +0000 Received: by radix.cryptio.net (Postfix, from userid 1007) id E59F171C50E; Thu, 2 Jul 2009 13:49:15 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by radix.cryptio.net (Postfix) with ESMTP id E142871C50A for ; Thu, 2 Jul 2009 13:49:15 -0700 (PDT) Date: Thu, 2 Jul 2009 13:49:15 -0700 (PDT) From: Chris Hostetter To: solr-user@lucene.apache.org Subject: Re: Deleting from SolrQueryResponse In-Reply-To: <24266686.post@talk.nabble.com> Message-ID: References: <24266686.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org : Hi, I was wondering if any has had luck deleting added documents to : SolrQueryResponse? I am subclassing StandardRequestHandler and after I run : the handle request body method (super.handleRequestBody(req, rsp);) I won't : to filter out some of the hits. DocLists are immutable (if i remember correctly) but your handler can always remove the DocList from the SolrQueryResponse and then replce it with a new one after you've made your changes. one thing to keep in mind however is that post-processing a DocList to filter stuff out is almost never a good idea -- things get really convoluted when you think about dealing with pagination and except for some really trivial use cases you can never know what your upper bound should be when deciding how many hits to request from underlying IndexSearcher. You're usually better off restructuring your problem so that you can construct a Query/Filter/DocSet that you want to filter by first and *then* executing the search to generate the DocList in a single pass. PS: replying to your own message (or reposting it) to "bump" it up generally doesn't encourage replies any faster -- it just increases the volume of traffic on the list, and if anything antagonizes people and makes them less interested in responding. -Hoss