Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 6254 invoked from network); 14 May 2010 02:55:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 May 2010 02:55:38 -0000 Received: (qmail 10108 invoked by uid 500); 14 May 2010 02:55:36 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 9947 invoked by uid 500); 14 May 2010 02:55:36 -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 9939 invoked by uid 99); 14 May 2010 02:55:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 May 2010 02:55:35 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of srbh.grwl@gmail.com designates 209.85.160.48 as permitted sender) Received: from [209.85.160.48] (HELO mail-pw0-f48.google.com) (209.85.160.48) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 May 2010 02:55:27 +0000 Received: by pwi6 with SMTP id 6so1309491pwi.35 for ; Thu, 13 May 2010 19:55:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=/TPN+ZwdcnNxVUnyfg87WhUVnO7KIQ4apC2gB2g0fBY=; b=t9QFSPl6HDyzRyUf9J4C7V+Ox3QPI+UcW/GE+nX1SuywcoH6zAjNdtt9JQPcQZwhM/ hsnKowW6zXtNZfGcdNq9HATId7+oVW56OuvGxiLCPL5z587Pmjeo9xMARxzO4o7dlsfp L+j2u1gcy9c5YB0cICU0hAWIYcBvTfF6VUH60= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ncIQeoxa1Jx1U4/OeHVPDVZo563FJLzU/J5Fz67KMLnIoN6y5VjQ0JhWJvevwIivaU 20mDLZDuwLm5Eaff+cHRLmxRCjQLhUJckn0Rpk/aER/IyJEvLhms5XozqWYlQOYnxj1e X9O0slLRtr+qNRTJtA7gsD5J+W50b5utLugOU= MIME-Version: 1.0 Received: by 10.142.3.35 with SMTP id 35mr255269wfc.74.1273805706335; Thu, 13 May 2010 19:55:06 -0700 (PDT) Received: by 10.143.163.6 with HTTP; Thu, 13 May 2010 19:55:06 -0700 (PDT) In-Reply-To: References: Date: Fri, 14 May 2010 08:25:06 +0530 Message-ID: Subject: Re: Storing a field as byte[[] From: Saurabh Agarwal To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=00504502c10da396b004868500c4 X-Virus-Checked: Checked by ClamAV on apache.org --00504502c10da396b004868500c4 Content-Type: text/plain; charset=ISO-8859-1 hi Ian but when I see lucene-3.0.0/src/java/org/apache/lucene/document/Field.java all the constructors either take a String ad value or a byte [] array as a value. Can u guide me that how to use NumericField or am I missing something? Thanks Saurabh Agarwal On Fri, May 14, 2010 at 1:33 AM, Ian Lea wrote: > You can store byte arrays, but you can't search on them. For integers > you can either pad them out with leading zeros or use NumericField. If > you use NumericField you'll need to use NumericRangeQuery as well. > > -- > Ian. > > > On Thu, May 13, 2010 at 8:44 PM, Saurabh Agarwal > wrote: > > Hi, > > I am new to lucene. the constructors in Feild show that I can give the > value > > as byte[] I wanted to ask if I store a integer as a byte array the how it > > will ve searched during search say file size!!! > > > > because if I use text format the range search will be poor say fs of 10 > 12 > > 20 30 50 100 101 102 will be organised as > > 10 > > 100 > > 101 > > 102 > > 12 > > 20 > > 30 > > 50 > > > > so range search of size between 10 and 20 will be relatively poor if I > store > > values like the order given > > > > Thanks and regards > > Saurabh Agarwal > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --00504502c10da396b004868500c4--