}
} else {
log.info("Searchable fields not configured; trying to guess...");
Collection fields = doc.getFields();
for (Iterator itr = fields.iterator(); itr.hasNext(); ) {
Field field = (Field)itr.next();
StoreOption store = field.getStoreOption();
IndexOption index = field.getIndexOption();
if ((store == StoreOption.YES || store == StoreOption.COMPRESS)
&& (index == IndexOption.TOKENIZED || index == IndexOption.UN_TOKENIZED)) {
log.info("Field " + field.getName()
+ " is added to the synthetic field");
if (builder == null) {
builder = new StringBuilder();
}
builder.append(field.getValue()).append(fieldDelimiter);
}
}
}
if (builder != null) {
String name = syntheticField;