com.endeca.infront.cartridge
Class ResultsListConfig

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.ResultsListConfig
All Implemented Interfaces:
ContentItem, Serializable, Cloneable, Map<String,Object>

public class ResultsListConfig
extends BasicContentItem

ResultsListHandler 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
ResultsListConfig()
          Creates a ResultsListConfig with the following default settings: offset = 0 recordsPerPage = 10 whyMatchEnabled = false whyRankEnabled = false
ResultsListConfig(String pType)
          Creates a ResultsListConfig with the specified type and the following default settings: offset = 0 recordsPerPage = 10 whyMatchEnabled = false whyRankEnabled = false
 
Method Summary
 List<CollectionFilter> getBoostStrata()
          Returns filters which allow items to be boosted to the top of the results.
 List<CollectionFilter> getBuryStrata()
          Returns filters which allow items to be buried at the bottom of the results.
 List<String> getFieldNames()
          Returns the record fields that will be returned in the ContentItem.
 long getOffset()
          Returns the record offset.
 String getRecordDisplayFieldName()
          Returns the field that is considered to hold the name of the record
 int getRecordsPerPage()
          Returns records displayed per page.
 String getRelRank()
          Deprecated. use getRelRankStrategy() instead.
 String getRelRankKey()
          Returns the relevance ranking key to be used with the relevance ranking strategy.
 MatchMode getRelRankMatchMode()
          Returns the relevance ranking match mode.
 String getRelRankStrategy()
          Returns the relevance ranking strategy.
 String getRelRankTerms()
          Returns the relevance ranking terms to be used with the relevance ranking strategy.
 SortOption getSortOption()
          Returns the sort option, may be null.
 List<String> getSubRecordFieldNames()
          Returns the sub-record fields (of aggregate records) that will be returned in the ContentItem.
 SubRecordsPerAggregateRecord getSubRecordsPerAggregateRecord()
          For aggregate records, the number of sub records that should be included in the results.
 boolean isIncludePrecomputedSorts()
           
 boolean isWhyMatchEnabled()
          Returns if why match debugging should be enabled.
 boolean isWhyRankEnabled()
          Returns if why rank debugging should be enabled.
 void setBoostStrata(List<CollectionFilter> boostStrata)
          Sets filters which allow items to be boosted to the top of the results.
 void setBuryStrata(List<CollectionFilter> buryStrata)
          Sets filters which allow items to be buried at the bottom of the results.
 void setFieldNames(List<String> fieldNames)
          Specifies which record fields will be passed through from the records to the resulting ContentItem.
 void setIncludePrecomputedSorts(boolean enabled)
          Sets if default sorts (precomputed mdex sorts) are included in the results list model
 void setOffset(long offset)
          Sets the record offset.
 void setRecordDisplayFieldName(String recordDisplayFieldName)
          Sets the name of the field that stores the record's logical name
 void setRecordsPerPage(int recsPerPage)
          Sets records displayed per page.
 void setRelRank(String relRank)
          Deprecated. use setRelRankStrategy(String) instead.
 void setRelRankKey(String relRankKey)
          Sets the relevance ranking key to be used with the relevance ranking strategy.
 void setRelRankMatchMode(MatchMode relRankMatchMode)
          Sets the relevance ranking match mode.
 void setRelRankStrategy(String relRankStrategy)
          Sets the relevance ranking strategy.
 void setRelRankTerms(String relRankTerms)
          Sets one or more terms that will be used with the relevance ranking strategy to order the records.
 void setSortOption(SortOption sortOption)
          Sets the sort option and also marks it as a default sort.
 void setSortRequestParameter(String paramValue)
          Sets the requested sort as a String.
 void setSubRecordFieldNames(List<String> fieldNames)
          Specifies which sub-record fields (of aggregate records) will be passed through to the resulting ContentItem.
 void setSubRecordsPerAggregateRecord(SubRecordsPerAggregateRecord numSubRecords)
          For aggregate records, sets the number of sub records that should be included in the results.
 void setWhyMatchEnabled(boolean enabled)
          Sets if why match debugging should be enabled.
 void setWhyRankEnabled(boolean enabled)
          Sets if why rank debugging should be enabled.
 
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

ResultsListConfig

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


ResultsListConfig

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

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

getBoostStrata

public List<CollectionFilter> getBoostStrata()
Returns filters which allow items to be boosted to the top of the results. These are ignored if the user has selected a specific sort.

Returns:
boost stratification filters, may be null.

setBoostStrata

public void setBoostStrata(List<CollectionFilter> boostStrata)
Sets filters which allow items to be boosted to the top of the results. These are ignored if the user has selected a specific sort.

Parameters:
boostStrata - stratification filters, may be null.

getBuryStrata

public List<CollectionFilter> getBuryStrata()
Returns filters which allow items to be buried at the bottom of the results. These are ignored if the user has selected a specific sort.

Returns:
bury stratification filters, may be null.

setBuryStrata

public void setBuryStrata(List<CollectionFilter> buryStrata)
Sets filters which allow items to be buried at the bottom of the results. These are ignored if the user has selected a specific sort.

Parameters:
buryStrata - stratification filters, may be null.

getSortOption

public SortOption getSortOption()
Returns the sort option, may be null.


setSortOption

public void setSortOption(SortOption sortOption)
Sets the sort option and also marks it as a default sort. This method should not be used when creating instances that represent user-specified configuration (for example, when creating the configuration from a request URL).

See Also:
ResultsListRequestParamMarshaller

getRelRank

@Deprecated
public String getRelRank()
Deprecated. use getRelRankStrategy() instead.

Returns the relevance ranking strategy. This is ignored if the user has selected a specific sort.

Returns:
the relevance ranking strategy.
See Also:
setRelRank(String)

setRelRank

@Deprecated
public void setRelRank(String relRank)
Deprecated. use setRelRankStrategy(String) instead.

Sets the relevance ranking strategy. This is ignored if the user has selected a specific sort. This may be null, in which case default relevance ranking is used. The default relevance ranking strategy is defined in MDEX based on the search key.

Parameters:
relRank - the relevance ranking strategy. This may be null, in which case default relevance ranking is used. The default relevance ranking strategy is defined in MDEX based on the search key.

getRelRankStrategy

public String getRelRankStrategy()
Returns the relevance ranking strategy. This is ignored if the user has selected a specific sort.

Returns:
the relevance ranking strategy.
See Also:
setRelRankStrategy(String)

setRelRankStrategy

public void setRelRankStrategy(String relRankStrategy)
Sets the relevance ranking strategy. This is ignored if the user has selected a specific sort. This may be null, in which case default relevance ranking in MDEX is used. The default relevance ranking strategy is defined in MDEX based on the search key.

Relevance ranking strategy strings must contain one or more relevance ranking module names.

Module names can be any of these pre-defined modules: exact,field (useful for record search only),first,freq,glom (useful for record search only),interp, maxfield (useful for record search only),nterms,numfields (useful for record search only), phrase (for details on using phrase, see the section below),proximity,spell,stem, thesaurus,static (for details on using static, see the section below),wfreq

Module names are delimited by comma (,) characters. No other stray characters (such as spaces) are allowed. Module names are listed in descending order of priority.

The following are examples of valid relevance ranking strategy strings:

For more details on the behavior of relevance rank modules, see the Endeca MDEX Engine Advanced Development Guide.

Parameters:
relRankStrategy - the relevance ranking strategy. This may be null, in which case default relevance ranking is used. The default relevance ranking strategy is defined in MDEX based on the search key.

getRelRankKey

public String getRelRankKey()
Returns the relevance ranking key to be used with the relevance ranking strategy.

Returns:
the relevance ranking key to be used with the relevance ranking strategy.
See Also:
setRelRankKey(String)

setRelRankKey

public void setRelRankKey(String relRankKey)
Sets the relevance ranking key to be used with the relevance ranking strategy. The key may be a search interface defined in the Endeca MDEX or it may be a property or dimension in the Endeca MDEX, which is enabled for search.

This variable is optional, but if it is specified, a relevance ranking strategy setRelRankStrategy(String) and relevance ranking terms setRelRankTerms(String) must also be specified.

If this is null, but a relevance ranking strategy is specified setRelRankStrategy(String), the search key defined in the first search filter will be used instead FilterState.getSearchFilters().

When using EQL filter, this cannot be null if applying a relevance ranking other than the default MDEX relevance ranking strategy.

Parameters:
relRankKey - the relevance ranking key.

getRelRankTerms

public String getRelRankTerms()
Returns the relevance ranking terms to be used with the relevance ranking strategy.

Returns:
the relevance ranking terms to be used with the relevance ranking strategy.
See Also:
setRelRankTerms(String)

setRelRankTerms

public void setRelRankTerms(String relRankTerms)
Sets one or more terms that will be used with the relevance ranking strategy to order the records. For multiple terms, each term is delimited by a plus (+) sign. Note that these relevance ranking terms can be different from the search terms in the search filter. (as set by the Ntt parameter, for example). FilterState.getSearchFilters()

This variable is optional, but if it is specified, a relevance ranking strategy setRelRankStrategy(String) and relevance ranking key setRelRankKey(String) must also be specified.

If this is null, but a relevance ranking strategy is specified setRelRankStrategy(String), the search terms defined in the first search filter will be used instead FilterState.getSearchFilters().

When using EQL filter, this cannot be null if applying a relevance ranking other than the default MDEX relevance ranking strategy.

Parameters:
relRankTerms - the relevance ranking terms.

getRelRankMatchMode

public MatchMode getRelRankMatchMode()
Returns the relevance ranking match mode.

Returns:
the relevance ranking match mode.
See Also:
setRelRankMatchMode(com.endeca.infront.navigation.model.MatchMode)

setRelRankMatchMode

public void setRelRankMatchMode(MatchMode relRankMatchMode)
Sets the relevance ranking match mode. This mode will be used to determine which records in the result set to apply the relevance ranking strategy to. See the list of match modes here. MatchMode

This variable is optional, but if it is specified, a relevance ranking strategy setRelRankStrategy(String), relevance ranking key setRelRankKey(String) and relevance ranking terms setRelRankTerms(String) must also be specified.

If this is null, but a relevance ranking strategy is specified setRelRankStrategy(String), the match mode defined in the first search filter will be used instead FilterState.getSearchFilters().

When using EQL filter, this cannot be null if applying a relevance ranking other than the default MDEX relevance ranking strategy.

Parameters:
relRankMatchMode - the relevance ranking match mode.

setSubRecordsPerAggregateRecord

public void setSubRecordsPerAggregateRecord(SubRecordsPerAggregateRecord numSubRecords)
For aggregate records, sets the number of sub records that should be included in the results. Note that if zero sub records are requested, returned aggregate records will not include representative attributes (only derived attributes will be present).

Parameters:
numSubRecords - as specified by SubRecordsPerAggregateRecord.

getSubRecordsPerAggregateRecord

public SubRecordsPerAggregateRecord getSubRecordsPerAggregateRecord()
For aggregate records, the number of sub records that should be included in the results.

Returns:
zero, one, or all sub records, as specified by SubRecordsPerAggregateRecord. This method may also return null, in which case a default value of one will be assumed by the MDEX.

getRecordsPerPage

public int getRecordsPerPage()
Returns records displayed per page. The default is 10.


setRecordsPerPage

public void setRecordsPerPage(int recsPerPage)
Sets records displayed per page.

See Also:
ResultsListRequestParamMarshaller

getOffset

public long getOffset()
Returns the record offset. The default is 0.


setOffset

public void setOffset(long offset)
Sets the record offset.

See Also:
ResultsListRequestParamMarshaller

isWhyMatchEnabled

public boolean isWhyMatchEnabled()
Returns if why match debugging should be enabled. Default is false.

Note: For debugging information to be returned, it is not sufficient for this method to return true. Debugging must also be enabled on NavigationRequest. To accomplish this, specify debugEnabled=true when instantiating MdexRequestBroker.

See Also:
setWhyMatchEnabled(boolean), MdexRequestBroker

setWhyMatchEnabled

public void setWhyMatchEnabled(boolean enabled)
Sets if why match debugging should be enabled.

Note: in order for debugging information to be returned, debugging must be enabled on NavigationRequest. To accomplish this, specify debugEnabled=true when instantiating MdexRequestBroker.

See Also:
isWhyMatchEnabled(), ResultsListRequestParamMarshaller, MdexRequestBroker

isWhyRankEnabled

public boolean isWhyRankEnabled()
Returns if why rank debugging should be enabled. Default is false.

Note: For debugging information to be returned, it is not sufficient for this method to return true. Debugging must also be enabled on NavigationRequest. To accomplish this, specify debugEnabled=true when instantiating MdexRequestBroker.

See Also:
setWhyRankEnabled(boolean), MdexRequestBroker

setWhyRankEnabled

public void setWhyRankEnabled(boolean enabled)
Sets if why rank debugging should be enabled.

Note: in order for debugging information to be returned, debugging must be enabled on NavigationRequest. To accomplish this, specify debugEnabled=true when instantiating MdexRequestBroker.

See Also:
isWhyRankEnabled(), ResultsListRequestParamMarshaller, MdexRequestBroker

setSortRequestParameter

public void setSortRequestParameter(String paramValue)
Sets the requested sort as a String. This value is also parsed to create the SortOption.

See Also:
setSortOption(com.endeca.infront.navigation.model.SortOption), ResultsListRequestParamMarshaller

getRecordDisplayFieldName

public String getRecordDisplayFieldName()
Returns the field that is considered to hold the name of the record


setRecordDisplayFieldName

public void setRecordDisplayFieldName(String recordDisplayFieldName)
Sets the name of the field that stores the record's logical name

See Also:
ResultsListRequestParamMarshaller

setIncludePrecomputedSorts

public void setIncludePrecomputedSorts(boolean enabled)
Sets if default sorts (precomputed mdex sorts) are included in the results list model

See Also:
isIncludePrecomputedSorts()

isIncludePrecomputedSorts

public boolean isIncludePrecomputedSorts()
Returns:
if default sorts (precomputed mdex sorts) are included in the results list model. Default is false.

See Also:
setIncludePrecomputedSorts(boolean)

setFieldNames

public void setFieldNames(List<String> fieldNames)
Specifies which record fields will be passed through from the records to the resulting ContentItem. If null, the default set of field names configured for the MDEX (from render_config.xml) will be returned.

If aggregation is enabled, this list is used to specify the record field names for the aggregated records, and the subRecordFieldNames list is used to specify the record field names for the sub-records (child) records.

If aggregation is disabled and a subRecordFieldNames list is also specified, it will be combined with this list.

See Also:
getFieldNames(), getSubRecordFieldNames()

getFieldNames

public List<String> getFieldNames()
Returns the record fields that will be returned in the ContentItem.

Returns:
record fields to return. May be null, in which all configured record fields will be returned.
See Also:
setFieldNames(java.util.List), setSubRecordFieldNames(java.util.List)

setSubRecordFieldNames

public void setSubRecordFieldNames(List<String> fieldNames)
Specifies which sub-record fields (of aggregate records) will be passed through to the resulting ContentItem.

If aggregation is enabled and this list is null, all field names configured for the MDEX (from render_config.xml) will be returned on the sub-records (child records). The field names specified by setFieldNames(java.util.List) will be used to determine the field names returned on the aggregated records.

If aggregation is disabled and this list is non-null, its field names will be combined with the field names specified by setFieldNames(java.util.List); the combined list will be used to determine the field names that should be returned on the non-aggregated records.

See Also:
getSubRecordFieldNames(), getFieldNames()

getSubRecordFieldNames

public List<String> getSubRecordFieldNames()
Returns the sub-record fields (of aggregate records) that will be returned in the ContentItem. If aggregation is disabled, this list is combined with the fieldNames.

Returns:
sub-record fields to return. May be null, in which all configured sub-record fields will be returned.
See Also:
setSubRecordFieldNames(java.util.List), setFieldNames(java.util.List)


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