lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clemens Wyss DEV <clemens...@mysign.ch>
Subject Indexing an IntField but getting SotredField from found Document
Date Thu, 19 Feb 2015 12:22:34 GMT
When I index a Document with an IntField and then find that very Document the former IntField
is returned as StoredField. How do I determine the "original" fieldtype (IntField, LongField,
DoubleField ...)?

Must I ?
Number number = Field.numericValue();
if( number != null )
{
  if( number instanceof Integer)
  {
    ...
  }
  else if( number instanceof Double)
  {
    ...
  }
  ....
}
Mime
View raw message