* registered in the <code>propertiesMetdata</code>
*
* @author Andreas Kohlbecker
- * @date Dec 19, 2011
+ * @since Dec 19, 2011
*
*/
public class DescriptionBaseClassBridge extends AbstractClassBridge {
-
- /*
- * (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)
- */
@Override
public void set(String name, Object entity, Document document, LuceneOptions luceneOptions) {
for(TaxonNode node : taxon.getTaxonNodes()){
if(node.getClassification() != null){
- idFieldBridge.set(name + "taxon.taxonNodes.classification.id", node.getClassification().getId(), document, idFieldOptions);
+ idFieldBridge.set(name + "taxon.taxonNodes.classification.id",
+ node.getClassification().getId(), document, idFieldOptions);
+ }
+ if(node.treeIndex() != null){
+ Field treeIndexField = new StringField("inDescription.taxon.taxonNodes.treeIndex",
+ node.treeIndex(),
+ Store.YES
+ );
+ document.add(treeIndexField);
}
}
}