com.sapportals.wcm.service.indexmanagement.retrieval.search

Interface ISearchResult


public interface ISearchResult

Represents a document in the search result.
Changes between major releases 7.0 and 7.X


Method Summary
 void addLocalProperty(IProperty property)
          Adds a new local property.
 String getContentSnippet()
          Returns the content snippet.
 String getIndexId()
          The identifier of the index from where the results stems might be fetched by this method.
 IPropertyMap getLocalProperties()
          Return the local properties, including the content snippet.
 Integer getPosition()
          Only used internally when original sorting of the search results from Trex is used.
 float getRankValue()
          Specifies how good the result document fits to the search query.
 IResource getResource()
           
 String getResultLanguage()
          Document language if it was returned with the search result.
 IResource getWrappedResource()
           
 void setContentSnippet(String contentSnippet)
          Sets the content snippet.
 void setIndexId(String indexId)
          The identifier of the index from where the results stems might be set here.
 void setLocalProperties(IPropertyMap propertyMap)
          Sets the local properties.
 void setPosition(Integer i)
          Only used internally when original sorting of the search results from Trex is used.
 void setResultLanguage(String language)
          Sets the document language.
 void setUseWrapper(boolean b, IMetaModel metaModel, Set fetchedProperties)
          Defines if a special wrapped resource is returned for getWrappedResource.
 

Method Detail

getResource

IResource getResource()
Returns:
resource - document that has been found

getWrappedResource

IResource getWrappedResource()
Returns:
resource - document that has been found as a wrapped resource with property cache

getRankValue

float getRankValue()
Specifies how good the result document fits to the search query.

Returns:
rank value of taxonomy class folder (between 0.0 and 1.0)

getResultLanguage

String getResultLanguage()
Document language if it was returned with the search result. null if not available.

Returns:
document language

setResultLanguage

void setResultLanguage(String language)
Sets the document language.

Parameters:
document - language

setContentSnippet

void setContentSnippet(String contentSnippet)
                       throws ResourceException
Sets the content snippet. The content snippet is also part of the local properties.

Parameters:
contentSnippet -
Throws:
ResourceException - in case of a failure.

getContentSnippet

String getContentSnippet()
                         throws ResourceException
Returns the content snippet. null if not available.

Returns:
content snippet
Throws:
ResourceException - in case of a failure.

setLocalProperties

void setLocalProperties(IPropertyMap propertyMap)
Sets the local properties. All old local properties are deleted, including the content snippet.

Parameters:
propertyMap - which contains new local properties.

getLocalProperties

IPropertyMap getLocalProperties()
Return the local properties, including the content snippet.

Returns:
propertyMap which contains new local properties.

addLocalProperty

void addLocalProperty(IProperty property)
Adds a new local property. If an old property with the same name exists that property is replaced.

Parameters:
property - the new property

setIndexId

void setIndexId(String indexId)
The identifier of the index from where the results stems might be set here.

Parameters:
indexId -

getIndexId

String getIndexId()
The identifier of the index from where the results stems might be fetched by this method.

Returns:

setUseWrapper

void setUseWrapper(boolean b,
                   IMetaModel metaModel,
                   Set fetchedProperties)
Defines if a special wrapped resource is returned for getWrappedResource. If set to false the resource itself is returned in that method. The wrapped resource is currently supported by Trex search engine. For performance reasons the meta model should be also set.

Parameters:
b -
metaModel -
fetchedProperties - property names which are requested from the search server

setPosition

void setPosition(Integer i)
Only used internally when original sorting of the search results from Trex is used.

Parameters:
i -

getPosition

Integer getPosition()
Only used internally when original sorting of the search results from Trex is used.

Returns:
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2011 SAP AG Complete Copyright Notice