Hardy,
Thanks for pointing me where to check, yes, I wasn't actually doing the right FieldBridge
Indexing:
Code:
@Field(index = Index.TOKENIZED)
@FieldBridge(impl = CustomPropertyBridge.class)
private Properties partnerSpec;
CustomPropertyBridge:
Code:
public class CustomPropertyBridge implements FieldBridge {
/*
* (non-Javadoc)
*
* @see org.hibernate.search.bridge.FieldBridge#set(java.lang.String,
* java.lang.Object, org.apache.lucene.document.Document,
* org.hibernate.search.bridge.LuceneOptions)
*/
public void set(String name, Object value, Document document,
LuceneOptions luceneOptions) {
String fieldValue = "";
Properties properties = (Properties) value;
Enumeration<?> propertyValues = properties.elements();
while (propertyValues.hasMoreElements()) {
String v = (String) propertyValues.nextElement();
fieldValue += v + " ";
}
Field field = new Field(name, fieldValue, luceneOptions.getStore(),
luceneOptions.getIndex(), luceneOptions.getTermVector());
field.setBoost(luceneOptions.getBoost());
document.add(field);
}
}
again, thanks