String luceneName = fo.getFieldName();
if (luceneName == null) luceneName = field;
switch (type) {
case STRING: index.addField(luceneName, IndexUtilities.ObjectToString(o), analyzer, boost);break;
case KEYWORD: index.addField(luceneName, IndexUtilities.ObjectToString(o), boost);break;
case BOOLEAN: index.addField(luceneName, o, boost);break;
// JSON doesn't distinguish between int and long, always returns long
case INT: index.addField(luceneName, (Long)o, boost);break;
case LONG: index.addField(luceneName, (Long)o, boost);break;
case FLOAT: index.addField(luceneName, (Float)o, boost);break;
case DOUBLE: index.addField(luceneName, (Double)o, boost);break;