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 1A2771808B for ; Fri, 29 Apr 2016 07:57:58 +0000 (UTC) Received: (qmail 3171 invoked by uid 500); 29 Apr 2016 07:57:56 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 3111 invoked by uid 500); 29 Apr 2016 07:57: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 3090 invoked by uid 99); 29 Apr 2016 07:57:56 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Apr 2016 07:57:56 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id B344BC2B12 for ; Fri, 29 Apr 2016 07:57:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.021 X-Spam-Level: X-Spam-Status: No, score=-0.021 tagged_above=-999 required=6.31 tests=[RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 7sK2Cd-f8FHA for ; Fri, 29 Apr 2016 07:57:52 +0000 (UTC) Received: from mail7.servidoreswindows.net (mail7.servidoreswindows.net [91.213.46.151]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 9BA255F23A for ; Fri, 29 Apr 2016 07:57:52 +0000 (UTC) Received: from ([127.0.0.1]) by mail7.servidoreswindows.net (IceWarp 10.4.4) with ASMTP id RLI32849 for ; Fri, 29 Apr 2016 09:57:49 +0200 Date: Fri, 29 Apr 2016 09:57:49 +0200 To: java-user@lucene.apache.org From: j.Pardos Subject: Re: Storing numeric fields in Apache 6 Message-ID: <1f890dfc822b7eb1c49da374e923d3b7@estructure.es> X-Mailer: IceWarp Mailer 10.4.4 In-Reply-To: References: X-Priority: 3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Hello, The suggested change worked in part: Luke now shows me the field contents, = so it's correctly stored, for sure. However, when I ask the IndexReader = for the field listing (with MultiFields.getFields(IndexReader) method) it = doesn't return that field. I've noticed in luke that the field is not = indexed. Is that the reason? How could I fix it? Thanks. -----Original Message-----=20 > From: "Alan Woodward" =20 > To: java-user@lucene.apache.org=20 > Date: 04/28/16 14:30=20 > Subject: Re: Storing numeric fields in Apache 6=20 >=20 > You should add a StoredField with the same name containing the value: >=20 > doc.add(new DoublePoint(name, Double.parseDouble(value)); > doc.add(new StoredField(name, Double.parseDouble(value)); >=20 > Alan Woodward > www.flax.co.uk >=20 >=20 > On 28 Apr 2016, at 13:10, j.Pardos wrote: >=20 > > Hello all, > >=20 > > I need to index some numeric fields, search with numeric range = queries, and store the data to retrieve it afterwards.=20 > > If I understand correctly, the recommended way to do this in Lucene 6 = is with the DoublePoint/LongPoint/XxxPoint field types. I have already = implemented this, extending QueryParser for the numeric range queries, but = I can't find a way to store the data. > >=20 > > For example, for double values, I'm doing: > > doc.add(new DoublePoint(name, Double.parseDouble(value))); > >=20 > > DoublePoint doesn't have a "stored" argument in its constructor (as = does, for example, StringField), or a property to specify it = afterwards.=20 > >=20 > > What's the "right" way to do this? > >=20 > >=20 > >=20 > >=20 > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > > For additional commands, e-mail: java-user-help@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org