com.endeca.infront.cartridge
Class SearchAdjustmentsConfig

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,Object>
          extended by com.endeca.infront.assembler.BasicContentItem
              extended by com.endeca.infront.cartridge.SearchAdjustmentsConfig
All Implemented Interfaces:
ContentItem, Serializable, Cloneable, Map<String,Object>

public class SearchAdjustmentsConfig
extends BasicContentItem

SearchAdjustmentsHandler configuration model.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
SearchAdjustmentsConfig()
          Creates a SearchAdjustmentsConfig with the following default settings: phraseSuggestionEnabled = false spellSuggestionEnabled = false
SearchAdjustmentsConfig(ContentItem pContentItem)
          Creates a copy of the specified ContentItem, and returns it as an instance of SearchAdjustmentsConfig.
SearchAdjustmentsConfig(String pType)
          Creates a SearchAdjustmentsConfig with the specified type and the following default settings: phraseSuggestionEnabled = false spellSuggestionEnabled = false
 
Method Summary
 boolean isPhraseSuggestionEnabled()
           
 boolean isShowWordInterp()
           
 boolean isSpellSuggestionEnabled()
           
 void setPhraseSuggestionEnabled(boolean phraseSuggestionEnabled)
          If phrase suggestion is enabled, the MDEX may suggest that the user would get better search results by grouping 2 or more words as a phrase.
 void setShowWordInterp(boolean showWordInterp)
          Specifies that the SearchAdjustments cartridge should populate the interpreted terms.
 void setSpellSuggestionEnabled(boolean spellSuggestionEnabled)
          If spell suggestion is enabled, the MDEX may suggest that the user would get better search results by using an alternate spelling.
 
Methods inherited from class com.endeca.infront.assembler.BasicContentItem
getBooleanProperty, getIntProperty, getLongProperty, getType, getTypedProperty, setType
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

SearchAdjustmentsConfig

public SearchAdjustmentsConfig()
Creates a SearchAdjustmentsConfig with the following default settings:


SearchAdjustmentsConfig

public SearchAdjustmentsConfig(String pType)
Creates a SearchAdjustmentsConfig with the specified type and the following default settings:

Parameters:
pType - a value that will be used as the type
See Also:
BasicContentItem.getType()

SearchAdjustmentsConfig

public SearchAdjustmentsConfig(ContentItem pContentItem)
Creates a copy of the specified ContentItem, and returns it as an instance of SearchAdjustmentsConfig. If any of the following settings do not exist in the input ContentItem, then the default values listed below will be used if the settings are queried:

Method Detail

isPhraseSuggestionEnabled

public boolean isPhraseSuggestionEnabled()
Returns:
whether phrase suggestion is enabled. Defaults to true.
See Also:
setPhraseSuggestionEnabled(boolean)

setPhraseSuggestionEnabled

public void setPhraseSuggestionEnabled(boolean phraseSuggestionEnabled)
If phrase suggestion is enabled, the MDEX may suggest that the user would get better search results by grouping 2 or more words as a phrase. For example, you might have something like 'Did you mean "manual focus"?' when searching for 'manual focus' without quotes. If FilterState.autoPhraseEnabled is true, then the MDEX may treat 'manual focus' as a phrase automatically, and provide a suggestion to the user for the non-phrase.

Parameters:
phraseSuggestionEnabled - whether to return phrase suggestions

isSpellSuggestionEnabled

public boolean isSpellSuggestionEnabled()
Returns:
whether spell suggestion is enabled. Defaults to false.
See Also:
setSpellSuggestionEnabled(boolean)

setSpellSuggestionEnabled

public void setSpellSuggestionEnabled(boolean spellSuggestionEnabled)
If spell suggestion is enabled, the MDEX may suggest that the user would get better search results by using an alternate spelling. For example, you might have something like 'Did you mean "canon"?' when searching for 'cannon'.

Typically, the engine will auto correct or auto apply a suggestion if there are 0 results found for the user's search, but provide a suggestion if the users search returns a small number of results, but there are many more results for an alternative spelling.

Parameters:
spellSuggestionEnabled - whether to return SPELL suggestions

isShowWordInterp

public boolean isShowWordInterp()
Returns:
whether the SearchAdjustments model will contain interpreted terms for debugging. Default value is false. Note that it is not sufficient for this method to return true; the dgraph must also have been started with the --wordInterp flag.
See Also:
setShowWordInterp(boolean)

setShowWordInterp

public void setShowWordInterp(boolean showWordInterp)
Specifies that the SearchAdjustments cartridge should populate the interpreted terms. In order for interpreted word information to be available, the dgraph must be started with the --wordInterp flag. Setting this value just controls whether or not the information is added to the returned SearchAdjustments model object.

Parameters:
showWordInterp - whether to return interpreted terms
See Also:
SearchAdjustments.getInterpretedTerms()


Copyright © 2012, Oracle and/or its affiliates. All rights reserved.