Thank you very much, and sorry for the double post.

-----Mensaje original----- 
> De: "Alan Woodward" <a...@flax.co.uk> 
> A: java-user@lucene.apache.org 
> Fecha: 28/04/2016 14:30 
> Asunto: Re: Storing numeric fields in Apache 6 
> 
> You should add a StoredField with the same name containing the value:
> 
> doc.add(new DoublePoint(name, Double.parseDouble(value));
> doc.add(new StoredField(name, Double.parseDouble(value));
> 
> Alan Woodward
> www.flax.co.uk
> 
> 
> On 28 Apr 2016, at 13:10, j.Pardos wrote:
> 
> > Hello all,
> > 
> > I need to index some numeric fields, search with numeric range queries, and 
> > store the data to retrieve it afterwards. 
> > 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.
> > 
> > For example, for double values, I'm doing:
> > doc.add(new DoublePoint(name, Double.parseDouble(value)));
> > 
> > DoublePoint doesn't have a "stored" argument in its constructor (as does, 
> > for example, StringField), or a property to specify it afterwards. 
> > 
> > What's the "right" way to do this?
> > 
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> > For additional commands, e-mail: java-user-h...@lucene.apache.org
> >




---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to