org.compass.core.mapping.rsem.builder
Class ResourcePropertyMappingBuilder

java.lang.Object
  extended by org.compass.core.mapping.rsem.builder.ResourcePropertyMappingBuilder

public class ResourcePropertyMappingBuilder
extends Object

A builder allowing to constrcut resource property mapping definition.

Author:
kimchy
See Also:
RSEM.property(String)

Field Summary
(package private)  RawResourcePropertyMapping mapping
           
 
Constructor Summary
ResourcePropertyMappingBuilder(String name)
          Constructs a new resource property mapping builder for a resource property with the given name.
 
Method Summary
 ResourcePropertyMappingBuilder analyzer(String analyzer)
          Sets the analyzer logical name that will be used to analyzer the property value.
 ResourcePropertyMappingBuilder boost(float boost)
          Sets the boost value for the property mapping.
 ResourcePropertyMappingBuilder converter(Converter converter)
          Sets an actual converter that will be used to convert this property value.
 ResourcePropertyMappingBuilder converter(ResourcePropertyConverter converter)
          Sets an actual converter that will be used to convert this property value.
 ResourcePropertyMappingBuilder converter(String converterName)
          Sets the lookup converter name (registered with Compass) that will be used to convert the value of the property.
 ResourcePropertyMappingBuilder excludeFromAll(ExcludeFromAll excludeFromAll)
          Controls if the property will be excluded from all or not.
 ResourcePropertyMappingBuilder format(String format)
          Sets the format that will be used for formattable capable converters (such as numbers and dates).
 ResourcePropertyMappingBuilder index(Property.Index index)
          Specifies whether and how a property should be indexed.
 ResourcePropertyMappingBuilder nullValue(String nullValue)
          Sets the null value of the property.
 ResourcePropertyMappingBuilder omitNorms(boolean omitNorms)
          If set, omit normalization factors associated with this indexed field.
 ResourcePropertyMappingBuilder omitTf(boolean omitTf)
          If set, omit tf from postings of this indexed property.
 ResourcePropertyMappingBuilder spellCheck(SpellCheck spellCheck)
          Sets the spell check specific setting for the mapping.
 ResourcePropertyMappingBuilder store(Property.Store store)
          Specifies whether and how a property will be stored.
 ResourcePropertyMappingBuilder termVector(Property.TermVector termVector)
          Specifies whether and how a property should have term vectors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapping

final RawResourcePropertyMapping mapping
Constructor Detail

ResourcePropertyMappingBuilder

public ResourcePropertyMappingBuilder(String name)
Constructs a new resource property mapping builder for a resource property with the given name.

Method Detail

store

public ResourcePropertyMappingBuilder store(Property.Store store)
Specifies whether and how a property will be stored. Deftauls to Property.Store.YES.


index

public ResourcePropertyMappingBuilder index(Property.Index index)
Specifies whether and how a property should be indexed. Defaults to Property.Index.ANALYZED.


termVector

public ResourcePropertyMappingBuilder termVector(Property.TermVector termVector)
Specifies whether and how a property should have term vectors. Defaults to Property.TermVector.NO.


omitNorms

public ResourcePropertyMappingBuilder omitNorms(boolean omitNorms)
If set, omit normalization factors associated with this indexed field. This effectively disables indexing boosts and length normalization for this field. Defaults to false.


omitTf

public ResourcePropertyMappingBuilder omitTf(boolean omitTf)
If set, omit tf from postings of this indexed property. Defaults to false.


boost

public ResourcePropertyMappingBuilder boost(float boost)
Sets the boost value for the property mapping. Defaults to 1.0f.


format

public ResourcePropertyMappingBuilder format(String format)
Sets the format that will be used for formattable capable converters (such as numbers and dates).


converter

public ResourcePropertyMappingBuilder converter(String converterName)
Sets the lookup converter name (registered with Compass) that will be used to convert the value of the property.


converter

public ResourcePropertyMappingBuilder converter(Converter converter)
Sets an actual converter that will be used to convert this property value.


converter

public ResourcePropertyMappingBuilder converter(ResourcePropertyConverter converter)
Sets an actual converter that will be used to convert this property value.


analyzer

public ResourcePropertyMappingBuilder analyzer(String analyzer)
Sets the analyzer logical name that will be used to analyzer the property value. The name is a lookup name for an Analyzer that is registered with Compass.


excludeFromAll

public ResourcePropertyMappingBuilder excludeFromAll(ExcludeFromAll excludeFromAll)
Controls if the property will be excluded from all or not.


nullValue

public ResourcePropertyMappingBuilder nullValue(String nullValue)
Sets the null value of the property. If the property value is null, will store in the index the provided value.


spellCheck

public ResourcePropertyMappingBuilder spellCheck(SpellCheck spellCheck)
Sets the spell check specific setting for the mapping.



Copyright (c) 2004-2009 The Compass Project.