lucene-java-user mailing list archives

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

This looks like an XY problem (http://www.perlmonks.org/index.pl?node_id=542341). 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

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Christian Reuschling [mailto:christian.reuschling@gmail.com]
> 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: 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


Mime
View raw message