org.compass.core.mapping.osem.builder
Class SearchableConstantMappingBuilder

java.lang.Object
  extended by org.compass.core.mapping.osem.builder.SearchableConstantMappingBuilder

public class SearchableConstantMappingBuilder
extends Object

A constant meta-data that can be defined on a SearchableMappingBuilder class.

A constant meta-data is a predefined name and value pair that will be saved in the search engine index.

Author:
kimchy
See Also:
OSEM.constant(String), SearchableMappingBuilder.add(SearchableConstantMappingBuilder)

Field Summary
(package private)  ConstantMetaDataMapping mapping
           
 
Constructor Summary
SearchableConstantMappingBuilder(String name)
          Constructs a new constant metda data with the specified name.
 
Method Summary
 SearchableConstantMappingBuilder analyzer(String analyzer)
          Sets the analyzer logical name that will be used to analyzer the property value.
 SearchableConstantMappingBuilder boost(float boost)
          Sets the boost value for the property mapping.
 SearchableConstantMappingBuilder excludeFromAll(ExcludeFromAll excludeFromAll)
          Controls if the property will be excluded from all or not.
 SearchableConstantMappingBuilder index(Property.Index index)
          Specifies whether and how a property should be indexed.
 SearchableConstantMappingBuilder nullValue(String nullValue)
          Sets the null value of the property.
 SearchableConstantMappingBuilder omitNorms(boolean omitNorms)
          If set, omit normalization factors associated with this indexed field.
 SearchableConstantMappingBuilder omitTf(boolean omitTf)
          If set, omit tf from postings of this indexed property.
 SearchableConstantMappingBuilder overrideByName(boolean override)
          Sets if this mapping will override another mapping with the same name.
 SearchableConstantMappingBuilder spellCheck(SpellCheck spellCheck)
          Sets the spell check specific setting for the mapping.
 SearchableConstantMappingBuilder store(Property.Store store)
          Specifies whether and how a property will be stored.
 SearchableConstantMappingBuilder termVector(Property.TermVector termVector)
          Specifies whether and how a property should have term vectors.
 SearchableConstantMappingBuilder values(String... values)
          A list of values that the meta-data will have.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapping

final ConstantMetaDataMapping mapping
Constructor Detail

SearchableConstantMappingBuilder

public SearchableConstantMappingBuilder(String name)
Constructs a new constant metda data with the specified name.

Method Detail

values

public SearchableConstantMappingBuilder values(String... values)
A list of values that the meta-data will have.


store

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


index

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


termVector

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


omitNorms

public SearchableConstantMappingBuilder 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 SearchableConstantMappingBuilder omitTf(boolean omitTf)
If set, omit tf from postings of this indexed property. Defaults to false.


boost

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


excludeFromAll

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


overrideByName

public SearchableConstantMappingBuilder overrideByName(boolean override)
Sets if this mapping will override another mapping with the same name. Defaults to true.


analyzer

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


nullValue

public SearchableConstantMappingBuilder 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 SearchableConstantMappingBuilder spellCheck(SpellCheck spellCheck)
Sets the spell check specific setting for the mapping.



Copyright (c) 2004-2009 The Compass Project.