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

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

public class SearchableBoostMappingBuilder
extends Object

Allows to dynamically define the boost value of the resource based on a Class property value.

Author:
kimchy
See Also:
OSEM.boost(String), SearchableMappingBuilder.add(SearchableBoostMappingBuilder)

Field Summary
(package private)  ClassBoostPropertyMapping mapping
           
 
Constructor Summary
SearchableBoostMappingBuilder(String name)
          Constructs a new boost JSON property mapping.
 
Method Summary
 SearchableBoostMappingBuilder accessor(Accessor accessor)
          Sets the acessor the will be used for the class property.
 SearchableBoostMappingBuilder accessor(String accessor)
          Sets the acessor the will be used for the class property.
 SearchableBoostMappingBuilder defaultBoost(float defaultBoost)
          The default boost value that will be used of the JSON property to be used has null value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapping

final ClassBoostPropertyMapping mapping
Constructor Detail

SearchableBoostMappingBuilder

public SearchableBoostMappingBuilder(String name)
Constructs a new boost JSON property mapping.

Method Detail

defaultBoost

public SearchableBoostMappingBuilder defaultBoost(float defaultBoost)
The default boost value that will be used of the JSON property to be used has null value. Defaults to 1.0f.


accessor

public SearchableBoostMappingBuilder accessor(Accessor accessor)
Sets the acessor the will be used for the class property. Defaults to property (getter and optionally setter).


accessor

public SearchableBoostMappingBuilder accessor(String accessor)
Sets the acessor the will be used for the class property. Defaults to property (getter and optionally setter). Note, this is the lookup name of a PropertyAccessor registered with Compass, with two default ones (custom ones can be easily added) named field and property.



Copyright (c) 2004-2009 The Compass Project.