Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E34167DF2 for ; Wed, 14 Sep 2011 13:36:58 +0000 (UTC) Received: (qmail 10687 invoked by uid 500); 14 Sep 2011 13:36:56 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 10643 invoked by uid 500); 14 Sep 2011 13:36:56 -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 10635 invoked by uid 99); 14 Sep 2011 13:36:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Sep 2011 13:36:56 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ian.lea@gmail.com designates 209.85.210.176 as permitted sender) Received: from [209.85.210.176] (HELO mail-iy0-f176.google.com) (209.85.210.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Sep 2011 13:36:50 +0000 Received: by iabz7 with SMTP id z7so182147iab.35 for ; Wed, 14 Sep 2011 06:36:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=nze9eBRnQF+rV4KOW7SXprPdhRREjzPUffWLpGPXfUg=; b=l4W3VwDWLJYXwndKFQz9+YgM8ELM8SrnXK+mGxtmTXSQ0AXTpYg/FEiY50rvoEVaBA CRwX15qrm9TBbRMJsS6U1CBs6mblyqxqNvheeVpRzHlatYFvIyrqLZBmKgpH5ZiePgfw w2vlXzKmsY5Piqtitux0qpzTqLXfhETftu4j0= Received: by 10.231.81.70 with SMTP id w6mr11387821ibk.51.1316007390100; Wed, 14 Sep 2011 06:36:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.104.130 with HTTP; Wed, 14 Sep 2011 06:36:10 -0700 (PDT) In-Reply-To: References: From: Ian Lea Date: Wed, 14 Sep 2011 14:36:10 +0100 Message-ID: Subject: Re: deleting with sorting and max document To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 You can get a list of document ids via your search/sort call and call IndexReader.deleteDocument(int docNum) for each one. -- Ian. On Wed, Sep 14, 2011 at 2:23 PM, wrote: > Hi, > > I have an index with 35 millions docs in it. every day I need to delete > some of the oldest docs that meet some criteria. > > I can easily do this on the searcher by using search(Query query, int n, > Sort sort) > > but there is nothing equivalent for the deleteDocuments. > > what are my options? > > thanks, > > vincent > > ************************ DISCLAIMER ************************ > This message is intended only for use by the person to > whom it is addressed. It may contain information that is > privileged and confidential. Its content does not > constitute a formal commitment by Lombard Odier > Darier Hentsch & Cie or any of its branches or affiliates. > If you are not the intended recipient of this message, > kindly notify the sender immediately and destroy this > message. Thank You. > ***************************************************************** > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org