code: private Comparable<?>  getValue(String value, int type)
     {
        switch (type)
        {
           case PropertyType.BOOLEAN :
              return ComparableBoolean.valueOf(Boolean.valueOf(value).booleanValue());
           case PropertyType.DATE :
              return new Long(DateField.stringToTime(value));
           case PropertyType.LONG :
              return new Long(LongField.stringToLong(value));
           case PropertyType.DOUBLE :
              return new Double(DoubleField.stringToDouble(value));
           default :
              return value;
        }
     }
docs: Returns a comparable for the given <code>value</code> that is read from
  the index.
  
  @param value the value as read from the index.
  @param type the property type.
  @return a comparable for the <code>value</code>.