org.compass.core.mapping.json.builder
Class JsonIdMappingBuilder

java.lang.Object
  extended by org.compass.core.mapping.json.builder.JsonIdMappingBuilder

public class JsonIdMappingBuilder
extends Object

A builder allowing to constrcut json id mapping definition.

Author:
kimchy
See Also:
JSEM.id(String)

Field Summary
(package private)  JsonIdMapping mapping
           
 
Constructor Summary
JsonIdMappingBuilder(String name)
          Constructs a new json id mapping builder for the specified name.
 
Method Summary
 JsonIdMappingBuilder analyzer(String analyzer)
          Sets the analyzer logical name that will be used to analyzer the property value.
 JsonIdMappingBuilder boost(float boost)
          Sets the boost value for the id property mapping.
 JsonIdMappingBuilder excludeFromAll(ExcludeFromAll excludeFromAll)
          Controls if the id property will be excluded from all or not.
 JsonIdMappingBuilder format(String format)
          Sets the format that will be used for formattable capable converters (such as numbers and dates).
 JsonIdMappingBuilder mappingConverter(Converter converter)
          Sets the actual converter that will be used to convert the JSON property.
 JsonIdMappingBuilder mappingConverter(String converterName)
          Sets the lookup converter name (registered with Compass) that will be used to convert the JSON property.
 JsonIdMappingBuilder omitNorms(boolean omitNorms)
          If set, omit normalization factors associated with this indexed field.
 JsonIdMappingBuilder omitTf(boolean omitTf)
          If set, omit tf from postings of this indexed property.
 JsonIdMappingBuilder spellCheck(SpellCheck spellCheck)
          Sets the spell check specific setting for the mapping.
 JsonIdMappingBuilder valueConverter(Converter converter)
          Sets the actual converter that will be used to convert the actual value of the json property.
 JsonIdMappingBuilder valueConverter(ResourcePropertyConverter converter)
          Sets the actual converter that will be used to convert the actual value of the json property.
 JsonIdMappingBuilder valueConverter(String converterName)
          Sets the lookup converter name (registered with Compass) that will be used to convert the actual value of the json property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapping

final JsonIdMapping mapping
Constructor Detail

JsonIdMappingBuilder

public JsonIdMappingBuilder(String name)
Constructs a new json id mapping builder for the specified name.

Method Detail

analyzer

public JsonIdMappingBuilder 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.


omitNorms

public JsonIdMappingBuilder omitNorms(boolean omitNorms)
If set, omit normalization factors associated with this indexed field. This effectively disables indexing boosts and length normalization for this field. By default, it is set for id mapping.


omitTf

public JsonIdMappingBuilder omitTf(boolean omitTf)
If set, omit tf from postings of this indexed property. By default, it is set for id mapping.


boost

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


format

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


mappingConverter

public JsonIdMappingBuilder mappingConverter(String converterName)
Sets the lookup converter name (registered with Compass) that will be used to convert the JSON property. Defaults to JsonIdMappingConverter.


mappingConverter

public JsonIdMappingBuilder mappingConverter(Converter converter)
Sets the actual converter that will be used to convert the JSON property. Defaults to JsonIdMappingConverter.


valueConverter

public JsonIdMappingBuilder valueConverter(String converterName)
Sets the lookup converter name (registered with Compass) that will be used to convert the actual value of the json property. Detaults to SimpleJsonValueConverter.


valueConverter

public JsonIdMappingBuilder valueConverter(Converter converter)
Sets the actual converter that will be used to convert the actual value of the json property. Detaults to SimpleJsonValueConverter.


valueConverter

public JsonIdMappingBuilder valueConverter(ResourcePropertyConverter converter)
Sets the actual converter that will be used to convert the actual value of the json property. Detaults to SimpleJsonValueConverter.


excludeFromAll

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


spellCheck

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



Copyright (c) 2004-2009 The Compass Project.