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

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

public class SearchableDynamicMetaDataMappingBuilder
extends Object

A dynamic meta data evaluation of the given expression using an expression language library.

Author:
kimchy

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

Field Detail

mapping

final DynamicMetaDataMapping mapping
Constructor Detail

SearchableDynamicMetaDataMappingBuilder

public SearchableDynamicMetaDataMappingBuilder(String name,
                                               String converter,
                                               String expression)
Constructs a new dynamic meta data mapping builder.

Parameters:
name - The name the expression evaluation will be stored under in the index
converter - The converter to use, for example: jexl, velocity, groovy, mvel, ...
expression - The expression used to evaluate
Method Detail

format

public SearchableDynamicMetaDataMappingBuilder format(String format)
The format to apply to the value. Only applies to format-able converters (like dates and numbers).


type

public SearchableDynamicMetaDataMappingBuilder type(Class type)
If using a format, the type of the expression result.


store

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


index

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


termVector

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


omitNorms

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


boost

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


excludeFromAll

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


overrideByName

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


analyzer

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



Copyright (c) 2004-2009 The Compass Project.