lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject RE: Empty numeric field
Date Wed, 15 Feb 2012 12:09:28 GMT

This looks like an XY problem ( Maybe you
should first explain to us, why you need that. In Lucene fields have no "equal length" or
something like that, especially numeric fields are tokenized and contain of several tokens
separately indexed. So what do you mean with equal length? Why must this "length" be identical?

The only suggestion is to index a "fake" placeholder value (like -1, infinity, NaN). If you
only need it in the "stored" fields, just store it but don't index it.


Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen

> -----Original Message-----
> From: Christian Reuschling []
> Sent: Wednesday, February 15, 2012 12:58 PM
> To: java-user
> Subject: Empty numeric field
> Hi all,
> for some reason, we need empty numeric field values (to ensure that the
> length of the field value list is constant). We tried to add an empty String-
> Fieldable instead in the case a value is not present, which seemed to work for
> searching.
> Nevertheless, when we want to sort against this field, sadly we fall into
> exceptions.
> Is there any possibility to store empty numeric fields into a document/the
> index?
> Thanks
> Chris
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message