org.hibernate.search.metadata
Interface IndexedTypeDescriptor

All Superinterfaces:
FieldContributor
All Known Implementing Classes:
IndexedTypeDescriptorForUnindexedType, IndexedTypeDescriptorImpl

public interface IndexedTypeDescriptor
extends FieldContributor

Top level descriptor of the metadata API. Giving access to the indexing information for a single type.

Author:
Hardy Ferentschik

Method Summary
 BoostStrategy getDynamicBoost()
           
 Set<FieldDescriptor> getFieldsForProperty(String propertyName)
          Returns the set of index descriptors for the indexed field generated by the property with the given name.
 Set<IndexDescriptor> getIndexDescriptors()
          Returns a set of IndexDescriptor instances describing Lucene index information, in particular the index name.
 FieldDescriptor getIndexedField(String fieldName)
          Retrieves the field descriptor for a given field name.
 Set<PropertyDescriptor> getIndexedProperties()
           
 PropertyDescriptor getProperty(String propertyName)
          Retrieves the property descriptor for a given property name.
 float getStaticBoost()
           
 Class<?> getType()
           
 boolean isIndexed()
           
 boolean isSharded()
           
 
Methods inherited from interface org.hibernate.search.metadata.FieldContributor
getIndexedFields
 

Method Detail

getType

Class<?> getType()
Returns:
the type for which this descriptor provides meta information

isIndexed

boolean isIndexed()
Returns:
true if the type for this descriptor is indexed, false otherwise

isSharded

boolean isSharded()
Returns:
true is this index is sharded, false otherwise

getIndexDescriptors

Set<IndexDescriptor> getIndexDescriptors()
Returns a set of IndexDescriptor instances describing Lucene index information, in particular the index name. The index name can also be used to retrieve the actual IndexManager for this index via org.hibernate.search.engine.spi.SearchFactoryImplementor#getIndexManagerHolder()#getIndexManager(String). For non sharded indexes there will be only a single IndexDescriptor. The empty set is returned for an unindexed type

Returns:
a set of IndexDescriptor instances describing Lucene index information

getStaticBoost

float getStaticBoost()
Returns:
the class boost value, 1 being the default.

getDynamicBoost

BoostStrategy getDynamicBoost()
Returns:
Dynamic boost strategy. There will always be a boost strategy, but the default strategy will apply a boost of 1.0.

getIndexedProperties

Set<PropertyDescriptor> getIndexedProperties()
Returns:
the set of indexed properties in form of PropertyDescriptors

getProperty

PropertyDescriptor getProperty(String propertyName)
Retrieves the property descriptor for a given property name.

Parameters:
propertyName - the property name for which to return descriptor, cannot be null
Returns:
the property descriptor for the specified property name. null is returned in case a property with the specified name does not exist
Throws:
IllegalArgumentException - in case propertyName is null

getIndexedField

FieldDescriptor getIndexedField(String fieldName)
Retrieves the field descriptor for a given field name.

Parameters:
fieldName - the field name for which to return descriptor, cannot be null
Returns:
the field descriptor for the specified field name. null is returned in case a field with the specified name does not exist
Throws:
IllegalArgumentException - in case fieldName is null

getFieldsForProperty

Set<FieldDescriptor> getFieldsForProperty(String propertyName)
Returns the set of index descriptors for the indexed field generated by the property with the given name.

Parameters:
propertyName - the property name, cannot be null
Returns:
the set of index descriptors for the indexed field generated by the property with the given name. The empty set is returned in case the property does not exist or does not produce any indexed fields.
Throws:
IllegalArgumentException - in case propertyName is null


Copyright © 2006-2013 Red Hat Middleware, LLC. All Rights Reserved