lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andres de la Peña <adelap...@stratio.com>
Subject Re: Storing numeric fields in Apache 6
Date Thu, 28 Apr 2016 12:19:03 GMT
If I'm right, you should use a StoredField to save the value, you can give
it the same name as the used for the DoublePoint field.

El jueves, 28 de abril de 2016, j.Pardos <j.pardos@estructure.es> escribió:

> 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-unsubscribe@lucene.apache.org
> <javascript:;>
> For additional commands, e-mail: java-user-help@lucene.apache.org
> <javascript:;>
>
>

-- 
Andrés de la Peña

Vía de las dos Castillas, 33, Ática 4, 3ª Planta
28224 Pozuelo de Alarcón, Madrid
Tel: +34 91 828 6473 // www.stratio.com // *@stratiobd
<https://twitter.com/StratioBD>*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message