Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 58232 invoked from network); 13 Jun 2005 12:32:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jun 2005 12:32:04 -0000 Received: (qmail 49755 invoked by uid 500); 13 Jun 2005 12:31:55 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 49696 invoked by uid 500); 13 Jun 2005 12:31:55 -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 49627 invoked by uid 99); 13 Jun 2005 12:31:54 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from ehatchersolutions.com (HELO ehatchersolutions.com) (69.55.225.129) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 13 Jun 2005 05:31:53 -0700 Received: by ehatchersolutions.com (Postfix, from userid 504) id 2564A13E2008; Mon, 13 Jun 2005 08:31:44 -0400 (EDT) Received: from [128.143.167.108] (d-128-167-108.bootp.Virginia.EDU [128.143.167.108]) by ehatchersolutions.com (Postfix) with ESMTP id E1EEA13E2007 for ; Mon, 13 Jun 2005 08:31:28 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v730) In-Reply-To: <42AD7234.1030607@idowa.de> References: <42AD7234.1030607@idowa.de> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <81839D95-EA7A-402A-971B-EC8736E340E6@ehatchersolutions.com> Content-Transfer-Encoding: 7bit From: Erik Hatcher Subject: Re: TooManyClauses in BooleanQuery Date: Mon, 13 Jun 2005 08:31:41 -0400 To: java-user@lucene.apache.org X-Mailer: Apple Mail (2.730) X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on javelina X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Jun 13, 2005, at 7:47 AM, Harald Stowasser wrote: > 1. Sorting by Date is ruinously slow. So I deactivated it. How were you sorting by date? > 3. I also read that we should save the Date as YYYYMMDD-String. I > don't > like this solution, because I don't know that this will work. And > then I > have to reindex the whole Data! It will work :) Terms need to be lexicographically orderable - and using YYYYMMDD will do just that as long as you don't need granularity beyond day. However, before reindexing with YYYYMMDD - what are your searching/sorting needs? If day is the granularity, then YYYYMMDD will be fine. However you may want to break it into more fields such as year, month, and day separately. Note: keep numbers padded to the same number of characters (1 for a day field should be "01" for example). For sorting, you may find that once you've used YYYYMMDD that you can then sort with the field type as INT on that same field (use Field.Keyword for indexing). > [3] > My Fields: > neu.setBoost( boost ); > neu.add(Field.UnStored("content",content)); > neu.add(Field.Keyword("keyword",keyword)); > ConfDate date = new ConfDate(datum); > neu.add(Field.Keyword("datum",(Date)date.getUtilDate())); > neu.add(Field.UnIndexed("content_vorschau",content_vorschau)); > neu.add(Field.UnIndexed("content_id",""+content_id)); > neu.add(Field.UnIndexed("zeitstempel",zeitstempel)); > neu.add(Field.UnIndexed("link",link)); > neu.add(Field.Keyword("bereich",bereich)); > index.addDocument(neu); What kind of granularity for dates does ConfDate.getUtilDate() return? Using Date for Field.Keyword indexes to the millisecond granularity - that is very unlikely to be of use to you at that level. Erik --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org