SAP NetWeaver '04

com.sapportals.wcm.service.indexmanagement
Interface IIndex

[contained in: com.sap.km.cm.service.par - km.shared.service.indexmanagement_api.jar]
All Known Subinterfaces:
IClassificationIndex, ISearchIndex
All Known Implementing Classes:
AbstractIndex

public interface IIndex

Represents a generic index object of the index management service.

The main properties of an index are:

To get an index object, follow this example:

  String indexId = "abc";
  IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
  IIndex index = indexService.getIndex(indexId);
 

See Also:
IIndexService, IIndexFolder

Method Summary
 void addFolderUri(URI folderUri)
          Deprecated. as of NW04. Use add(IIndexFolder) at the IIndexFolderList interface
 void checkProperties(java.util.Properties customProperties)
          With this method the properties that should be set could be checked.
 void clear()
          All documents are removed from the index and the index is set to an initial state.
 void createIndexOnServer()
          Creates the index on the index server connected with the CM system.
 void deindexDocument(IResource resource)
          Removes a document from the index.
 void deindexDocument(RID rid)
          Removes a document from the index.
 void deindexDocument(URI uri)
          Deprecated. as of NW04. Use deindexDocument(RID)
 void deindexDocuments(IResourceList resources)
          Removes a list of documents from the index
It is recommended that you do not deindex documents manually using this method.
For repositories that send cm events, documents are deindexed automatically when they are deleted.
For repositories that do not support eventing, for example, Web repositories, a delta index crawler should be scheduled for the index folders that need to be updated.
 void deindexDocuments(IRidList rids)
          Removes a list of documents from the index
It is recommended that you do not deindex documents manually using this method.
For repositories that send cm events, documents are deindexed automatically when they are deleted.
For repositories that do not support eventing, for example, Web repositories, a delta index crawler should be scheduled for the index folders that need to be updated.
 void deindexDocuments(IUriList uris)
          Deprecated. as of NW04. Use deindex documents(IRidList)
 void delete()
          Deprecated. as of NW04. Use deleted(IResourceContext)
 void delete(IResourceContext context)
          Deletes the index physically
Important: To delete an index the deleteIndex(IIndex) method of the IIndexService interface should be used instead of this.
 void deleteOnServer()
          Deletes the index on the index server connected with the CM system.
 void deltaReindex()
          Performs indexing of the documents that are not yet indexed or have been changed since the last crawl.
 void generate()
          Deprecated. as of NW04. Use generate(IResourceContext)
 void generate(IResourceContext context)
          Generates the index physically after creating the index object and initializing it
The index data is only saved on CM side if the index could be generated successfully.
 java.lang.String getCrawlerProfileId()
          ID of the default crawler profile for all index folders of the index.
 IUriList getFolderUris()
          Deprecated. as of NW04. Use getIndexFolders()
 IPropertyMap getIndexedProperties()
          Returns the properties, indexed with the documents in the index.
 IIndexFolder getIndexFolderForDocument(RID documentRid)
          Gets the index folder according to which the document is assigned to the index
Only index folders of this index are checked against the document.
 IIndexFolderList getIndexFolders()
          Folders or start pages that are assigned to the index for indexing.
 java.lang.String getIndexGroup()
          Returns the group of indexes to which the index logically belongs.
 java.lang.String getIndexId()
          Identifies the index within the system.
 AbstractIndex.IndexingState getIndexingState()
           
 java.lang.String getIndexName()
          Non-technical identifier of an index.
 java.util.List getLanguagesOfIndexedDocuments()
          Returns the languages of an index, for which documents exist in.
 java.util.Properties getProperties()
          These properties of the index are only the ones that are specific for an index implementation.
 java.lang.String getResourceInfo(IResource resource)
          Returns information about the resource with respect to the actual index e.g. the status of the document as well as general about the index e.g. its service types.
 RID getRID()
          Gets the resource ID of the resource representation of this index.
 ISchedulerTimeTable getSchedulerTimeTable()
          Returns the timetable of a schedule for delta index crawling for the index.
 java.lang.String getServiceId()
          Specifies the index implementation that is used for the index.
 java.util.List getServiceTypes()
          Determines the kind of index
A document can only be indexed into one index of an particular service type.
Examples of service types are "search" and "classification".
 java.util.List getServiceTypes(java.util.Locale locale)
          Displays representations of the indexes service types in the locale's language.
 ISupportedOptionSet getSupportedOptions()
          The actions of the additional interfaces of an index are supported actions for the index in question (for example, ISearchIndex, IClassificationIndex) that are supported by the index implementation.
 java.lang.String getWhatToIndexString()
           
 void indexDocument(IResource resource)
          Puts a document into the index.
 void indexDocument(IResource resource, IResourceEvent resourceEvent)
          Puts a document into the index
It is recommended that you do not index documents manually using this method.
For repositories that send cm events, documents are indexed automatically when their content or their properties are changed.
For repositories that do not support eventing, for example, Web repositories, a delta index crawler should be scheduled for the index folders that need to be updated.
 void indexDocuments(IResourceList resources)
          Puts a list of documents into the index.
 void indexDocuments(IResourceList resources, IResourceEvent resourceEvent)
          Puts a list of documents into the index.
 boolean indexInternalLinks()
           
 void init(java.util.Properties indexProperties)
          Initializes the index with data that is specific for an index implementation
The implementation is responsible for storing this data.
This method is called before calling the generate() method.
 boolean isActive()
           
 int reduceNumberOfCrawler()
           
 void reindex()
          Clears the index (see clear() method) and starts putting all documents into the index again
It may be necessary to reindex an index if a CM repository that is assigned to the index now points to another underlying repository.
 void reindex(boolean disablePostClearTasks)
          Clears the index (see clear() method) and starts putting all documents into the index again
It may be necessary to reindex an index may be needed if a CM repository that is assigned to the index now points to another underlying repository.
 void removeAllFolderUris()
          Deprecated. as of NW04. Use clear() at the IIndexFolderList interface
 void removeFolderUri(URI folderUri)
          Deprecated. as of NW04. Use remove(IIndexFolder) at the IIndexFolderList interface
 boolean setActive(boolean isActive)
           
 void setActiveDuringStartup(boolean isActive)
           
 void setCrawlerProfileId(java.lang.String crawlerProfileId)
          Sets the ID of the default crawler profile for all index folders of the index.
 void setInactiveIndexHasChanged()
          Sets a property on true, if index documents have changed during index was inactive.
 void setIndexGroup(java.lang.String indexGroup)
          Assigns the index to a group of indexes that logically belong together.
 void setIndexingState(AbstractIndex.IndexingState state)
           
 void setIndexName(java.lang.String indexName)
          Non-technical identifier of an index.
 void setProperties(java.util.Properties indexProperties)
          Saves index data that is specific for an index implementation
The implementation is responsible for storing this data.
Example:
String indexId = "abc"; IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE); IIndex index = indexService.getIndex(indexId); Properties customProperties = new Properties(); customProperties.put("propertyXY","valueXY"); index.setProperties(customProperties); As an example of an index specific property, a TrexSearchIndex has the property "fuzziness" that can have values from "0.0" to "1.0".
This property is stored by the TrexSearchIndex class itself because the property is not a generic index property.
 void setSchedulerTimeTable(ISchedulerTimeTable schedulerTimeTable)
          Registers a schedule for delta index crawling for the index with the ISchedulerTimeTable.
 void setStateAndNumberOfCrawler(AbstractIndex.IndexingState state, int numOfCrawler)
           
 void setWhatToIndex(java.lang.String whatToIndex)
           
 boolean typeShouldBeIndexed(IResource resource)
           
 

Method Detail

getIndexedProperties

public IPropertyMap getIndexedProperties()
                                  throws WcmException
Returns the properties, indexed with the documents in the index. Only the information about the properties not all their values are returned, i.e. each property appearch only one time in the return map.
Returns:
Map with the properties
Throws:
WcmException - Exception raised in failure situation

getIndexId

public java.lang.String getIndexId()
Identifies the index within the system.
The ID of an index is needed to get the IIndex object from the IIndexService.
Forbidden characters for an index ID are dot('.'), space(' ') and plus('+').
Returns:
ID of the index as a String

getIndexName

public java.lang.String getIndexName()
Non-technical identifier of an index.
The index name should be used for display purposes only.
All characters are allowed for an index name. If no index name is available, the index ID is returned.
Returns:
display name of the index

addFolderUri

public void addFolderUri(URI folderUri)
Deprecated. as of NW04. Use add(IIndexFolder) at the IIndexFolderList interface

For internal use.
Parameters:
folderUri - FolderUri to be added

getFolderUris

public IUriList getFolderUris()
Deprecated. as of NW04. Use getIndexFolders()

Returns:
list of URI objects that represent the attached folders of the index

getIndexFolders

public IIndexFolderList getIndexFolders()
Folders or start pages that are assigned to the index for indexing.
A document is added to a particular index, if a superior folder (or startpage) is contained in IIndexFolderList. If more than one superior folder is attached to different indexes, the lower folder determines the index, in which the document is stored.
Returns:
list of IIndexFolder objects that represent the attached folders of the index

getServiceId

public java.lang.String getServiceId()
Specifies the index implementation that is used for the index.
Every service ID is linked to a java class from which the index object is instantiated.
The index implementation determines the interfaces that can be used for the index.
Additionally, the service types of the index are determined by the implementation.
Example:
Service ID: trexSearchAndClassification
Java Class: com.sapportals.wcm.service.indexmanagement.retrieval.trex.TrexSearchAndClassificationIndex
Additional interfaces: ISearchIndex, IClassificationIndex
Service types: search, classification
Returns:
identifier of the index service as a String

getIndexGroup

public java.lang.String getIndexGroup()
Returns the group of indexes to which the index logically belongs.
Grouping indexes makes it possible to perform operations on more than one index by selecting an index group and performing the action on all indexes in that group.
These cumulative functions must be implemented on UI level. Currently this is implemented in the CM search dialog box for the selection of indexes. Selection is carried out by selecting an index group to search in all indexes that belong to that group. group can be null.
Returns:
group the index has been assigned to

getServiceTypes

public java.util.List getServiceTypes()
Determines the kind of index
A document can only be indexed into one index of an particular service type.
Examples of service types are "search" and "classification".
Returns:
list of service types of the index as String
Service types are available as constants of the interface IWcmIndexConst starting with "SERVICE_TYPE_".

getServiceTypes

public java.util.List getServiceTypes(java.util.Locale locale)
Displays representations of the indexes service types in the locale's language.
The returned types should only be used for display purposes.
Parameters:
locale - locale in which the service type names have to be returned
Returns:
list of service types of the index as String in the locale's language

getCrawlerProfileId

public java.lang.String getCrawlerProfileId()
ID of the default crawler profile for all index folders of the index.
Returns:
crawler profile ID

removeAllFolderUris

public void removeAllFolderUris()
Deprecated. as of NW04. Use clear() at the IIndexFolderList interface

For internal use

removeFolderUri

public void removeFolderUri(URI folderUri)
Deprecated. as of NW04. Use remove(IIndexFolder) at the IIndexFolderList interface

For internal use
Parameters:
folderUri - URI of the folder to remove from the index

setIndexName

public void setIndexName(java.lang.String indexName)
Non-technical identifier of an index.
The index name should be used for display purposes only.
All characters are allowed for an index name.

To save the new index name permanently, updateIndex(IIndex) must be called on the IIndexService interface.
Example:

  String indexId = "abc";
  IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
  IIndex index = indexService.getIndex(indexId);
  index.setIndexName("abc index");
  indexService.updateIndex(index);
 
Parameters:
indexName - display name of the index

setIndexGroup

public void setIndexGroup(java.lang.String indexGroup)
Assigns the index to a group of indexes that logically belong together.
Grouping indexes makes it possible to perform operations on more than one index by selecting an index group and performing the action on all indexes of that group.
These cumulative functions must be implemented on UI level. Currently this is implemented in the CM search dialog for the selection of indexes. Selection is done by just selecting an index group to search in all indexes that belong to that group.

To save the new index group permanently updateIndex(IIndex) must be called on the IIndexService interface.
Example:

  String indexId = "abc";
  IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
  IIndex index = indexService.getIndex(indexId);
  index.setIndexGroup("intranet");
  indexService.updateIndex(index);
 
Parameters:
indexGroup - group the index has to been assigned to

setCrawlerProfileId

public void setCrawlerProfileId(java.lang.String crawlerProfileId)
                         throws WcmException
Sets the ID of the default crawler profile for all index folders of the index.
Parameters:
CrawlerProfileId - The new CrawlerProfileId value
Throws:
WcmException - if the operation fails

indexDocuments

public void indexDocuments(IResourceList resources)
                    throws ResourceException,
                           WcmException,
                           java.io.IOException
Puts a list of documents into the index.
It is recommended that you do not index documents manually using this method.
In case of repositories that are sending cm events, documents are indexed automatically when their content or their properties are changed.
In case of repositories that are not supporting eventing, e.g. web repositories, a delta index crawler should be scheduled for the index folders that need to be updated.
Parameters:
resources - documents to index as IResourceList
Throws:
ResourceException - exception raised in failure situation
WcmException - exception raised in failure situation
java.io.IOException - exception raised in failure situation

indexDocuments

public void indexDocuments(IResourceList resources,
                           IResourceEvent resourceEvent)
                    throws ResourceException,
                           WcmException,
                           java.io.IOException
Puts a list of documents into the index.
It is recommended that you do not index documents manually using this method.
For repositories that send cm events, documents are indexed automatically when their content or their properties are changed.
For repositories that do not support eventing, for example, Web repositories, a delta index crawler should be scheduled for the index folders that need to be updated.
Parameters:
resources - documents to index as IResourceList
resourceEvent - event that caused the index request
Throws:
ResourceException - exception raised in failure situation
WcmException - exception raised in failure situation
java.io.IOException - exception raised in failure situation

indexDocument

public void indexDocument(IResource resource)
                   throws ResourceException,
                          WcmException,
                          java.io.IOException
Puts a document into the index.
It is recommended that you do not index documents manually using this method.
For repositories that send cm events, documents are indexed automatically when their content or their properties are changed.
For repositories that do not support eventing, for example, Web repositories, a delta index crawler should be scheduled for the index folders that need to be updated.
Parameters:
resource - document to index
Throws:
ResourceException - exception raised in failure situation
WcmException - exception raised in failure situation
java.io.IOException - exception raised in failure situation

indexDocument

public void indexDocument(IResource resource,
                          IResourceEvent resourceEvent)
                   throws ResourceException,
                          WcmException,
                          java.io.IOException
Puts a document into the index
It is recommended that you do not index documents manually using this method.
For repositories that send cm events, documents are indexed automatically when their content or their properties are changed.
For repositories that do not support eventing, for example, Web repositories, a delta index crawler should be scheduled for the index folders that need to be updated.
Parameters:
resource - document to index
Throws:
ResourceException - exception raised in failure situation
WcmException - exception raised in failure situation
java.io.IOException - exception raised in failure situation

deindexDocuments

public void deindexDocuments(IResourceList resources)
                      throws WcmException,
                             ResourceException
Removes a list of documents from the index
It is recommended that you do not deindex documents manually using this method.
For repositories that send cm events, documents are deindexed automatically when they are deleted.
For repositories that do not support eventing, for example, Web repositories, a delta index crawler should be scheduled for the index folders that need to be updated. The crawler deindexes documents that have been deleted since the last crawl.
Parameters:
resources - documents to remove from the index
Throws:
WcmException - exception raised in failure situation
ResourceException - exception raised in failure situation

deindexDocuments

public void deindexDocuments(IUriList uris)
                      throws WcmException,
                             ResourceException
Deprecated. as of NW04. Use deindex documents(IRidList)

Deindexes documents.
Parameters:
uris - list of URI objects
Throws:
WcmException - exception raised in failure situation
ResourceException - exception raised in failure situation

deindexDocuments

public void deindexDocuments(IRidList rids)
                      throws WcmException,
                             ResourceException
Removes a list of documents from the index
It is recommended that you do not deindex documents manually using this method.
For repositories that send cm events, documents are deindexed automatically when they are deleted.
For repositories that do not support eventing, for example, Web repositories, a delta index crawler should be scheduled for the index folders that need to be updated. The crawler deindexes documents that have been deleted since the last crawl.
Parameters:
rids - resource IDs to remove from the index where every RID represents a document
Throws:
WcmException - exception raised in failure situation
ResourceException - exception raised in failure situation

deindexDocument

public void deindexDocument(IResource resource)
                     throws WcmException,
                            ResourceException
Removes a document from the index.
It is recommended that you do not deindex documents manually using this method.
For repositories that send cm events, documents are deindexed automatically when they are deleted.
For repositories that do not support eventing, for example, Web repositories, a delta index crawler should be scheduled for the index folders that need to be updated. The crawler deindexes documents that have been deleted since the last crawl.
Parameters:
resource - document to remove from the index
Throws:
WcmException - exception raised in failure situation
ResourceException - exception raised in failure situation

deindexDocument

public void deindexDocument(URI uri)
                     throws WcmException,
                            ResourceException
Deprecated. as of NW04. Use deindexDocument(RID)

Deindexes a URI (method for internal use)
Parameters:
uri - URI to deindex
Throws:
WcmException - exception raised in failure situation
ResourceException - exception raised in failure situation

deindexDocument

public void deindexDocument(RID rid)
                     throws WcmException,
                            ResourceException
Removes a document from the index.
It is recommended that you do not deindex documents manually using this method.
For repositories that send cm events, documents are deindexed automatically when they are deleted.
For repositories that do not support eventing, for example, Web repositories, a delta index crawler should be scheduled for the index folders that need to be updated. The crawler deindexes documents that have been deleted since the last crawl.
Parameters:
rid - resource ID as reference to a document to remove from the index
Throws:
WcmException - exception raised in failure situation
ResourceException - exception raised in failure situation

delete

public void delete()
            throws WcmException
Deprecated. as of NW04. Use deleted(IResourceContext)

Deletes the index physically.
Important: To delete an index, the deleteIndex(IIndex) method of the IIndexService interface should be used instead of this. It deletes the index on cm side after internally calling this delete() method of the index to delete the index physically.

Example:

  String indexId = "abc";
  IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
  IIndex index = indexService.getIndex(indexId);
  indexService.deleteIndex(index);
 
Throws:
WcmException - exception raised in failure situation
IndexDoesNotExistOnServerException - raised if the index could not be deleted physically because it does not exist any more but could successfully be deleted on CM side.

delete

public void delete(IResourceContext context)
            throws WcmException
Deletes the index physically
Important: To delete an index the deleteIndex(IIndex) method of the IIndexService interface should be used instead of this. It deletes the index on cm side after internally calling this delete() method of the index to delete the index physically.

Example:

  String indexId = "abc";
  IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
  IIndex index = indexService.getIndex(indexId);
  indexService.deleteIndex(index);
 
Parameters:
context - user context
Throws:
WcmException - exception raised in failure situation
IndexDoesNotExistOnServerException - raised if the index could not be deleted physically because it does not exist any more but could be successfully deleted on CM side.

clear

public void clear()
           throws WcmException
All documents are removed from the index and the index is set to an initial state.
The configuration for the index remains, but all documents must be indexed again.
Using the reindex() method does exactly this. It first calls the clear() method to initialize the index and then starts indexing all index folders that are attached to the index.
Throws:
WcmException - exception raised in failure situation

deleteOnServer

public void deleteOnServer()
                    throws WcmException
Deletes the index on the index server connected with the CM system.
Throws:
WcmException -  

createIndexOnServer

public void createIndexOnServer()
                         throws WcmException
Creates the index on the index server connected with the CM system.
Throws:
WcmException -  

init

public void init(java.util.Properties indexProperties)
Initializes the index with data that is specific for an index implementation
The implementation is responsible for storing this data.
This method is called before calling the generate() method.

Example:

  IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
  IIndex index = indexService.createIndex(indexId, indexName, indexGroup, serviceId);
  Properties     customProperties  = new Properties();
  customProperties.put("propertyXY","valueXY");
  index.init(customProperties);
  index.generate();
 
As an example of an index specific property, a TrexSearchIndex has the property "fuzziness" that can have values from "0.0" to "1.0".
This property is stored by the TrexSearchIndex class itself because the property is not a generic index property.
Parameters:
indexProperties - property bag that contains index implementation specific properties

setProperties

public void setProperties(java.util.Properties indexProperties)
Saves index data that is specific for an index implementation
The implementation is responsible for storing this data.

Example:

  String indexId = "abc";
  IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
  IIndex index = indexService.getIndex(indexId);
  Properties     customProperties  = new Properties();
  customProperties.put("propertyXY","valueXY");
  index.setProperties(customProperties);
 
As an example of an index specific property, a TrexSearchIndex has the property "fuzziness" that can have values from "0.0" to "1.0".
This property is stored by the TrexSearchIndex class itself because the property is not a generic index property.
Parameters:
indexProperties - property bag that contains index implementation specific properties

getProperties

public java.util.Properties getProperties()
These properties of the index are only the ones that are specific for an index implementation.
For more see setProperties.
Returns:
properties of the index

checkProperties

public void checkProperties(java.util.Properties customProperties)
                     throws WcmException
With this method the properties that should be set could be checked. In case of a wrong property (range error, format error, etc.) a WcmException is thrown, with a localized error message, describing the problem. If the parameter is null, no exception is thrown.
Parameters:
customProperties -  
Throws:
WcmException -  

generate

public void generate()
              throws WcmException
Deprecated. as of NW04. Use generate(IResourceContext)

Generates the index physically after creating the index object and initializing it
The index data is only saved on CM side if the index could be generated successfully.

Example:

  IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
  IIndex index = indexService.createIndex(indexId, indexName, indexGroup, serviceId);
  Properties     customProperties  = new Properties();
  customProperties.put("propertyXY","valueXY");
  index.init(customProperties);
  index.generate();
 
Throws:
WcmException - exception raised in failure situation

generate

public void generate(IResourceContext context)
              throws WcmException
Generates the index physically after creating the index object and initializing it
The index data is only saved on CM side if the index could be generated successfully.

Example:

  IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
  IIndex index = indexService.createIndex(indexId, indexName, indexGroup, serviceId);
  Properties     customProperties  = new Properties();
  customProperties.put("propertyXY","valueXY");
  index.init(customProperties);
  index.generate();
 
Parameters:
context - user context
Throws:
WcmException - exception raised in failure situation

reindex

public void reindex()
             throws WcmException
Clears the index (see clear() method) and starts putting all documents into the index again
It may be necessary to reindex an index if a CM repository that is assigned to the index now points to another underlying repository. This can be caused by configuration changes. If this is the case, the documents in the index are no longer accessible from CM and must be removed from the index. The documents of the new target repository also have to be indexed.
Throws:
WcmException - exception raised in failure situation

reindex

public void reindex(boolean disablePostClearTasks)
             throws WcmException
Clears the index (see clear() method) and starts putting all documents into the index again
It may be necessary to reindex an index may be needed if a CM repository that is assigned to the index now points to another underlying repository. This can be caused by configuration changes. If this is the case, the documents in the index are no longer accessible from CM and must be removed from the index. The documents of the new target repository also have to be indexed.
Parameters:
disablePostClearTasks - if true, the tasks that can be performed by the index implementation after the index has been cleared are skipped.
Example: Do not train the classification index before reindexing all documents.
Throws:
WcmException - exception raised in failure situation

deltaReindex

public void deltaReindex()
                  throws WcmException
Performs indexing of the documents that are not yet indexed or have been changed since the last crawl.
Additionally, it deindexes documents from the index that were indexed but have since been deleted. In contrast to the reindex method, this call does not clear the index.
Throws:
WcmException - exception raised in failure situation

getSupportedOptions

public ISupportedOptionSet getSupportedOptions()
The actions of the additional interfaces of an index are supported actions for the index in question (for example, ISearchIndex, IClassificationIndex) that are supported by the index implementation.

Example:

  String indexId = "abc";
  IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
  IIndex index = indexService.getIndex(indexId);
  ISupportedOptionSet supportedOptions = index.getSupportedOptions();
  if (supportedOptions.isSupported(SupportedOption.SEARCH)) {
    //do search; it is supported by the index
  }
 
Returns:
set of supported actions as SupportedOption

getLanguagesOfIndexedDocuments

public java.util.List getLanguagesOfIndexedDocuments()
                                              throws WcmException
Returns the languages of an index, for which documents exist in.
Returns:
List of strings each describing one language.

getIndexFolderForDocument

public IIndexFolder getIndexFolderForDocument(RID documentRid)
Gets the index folder according to which the document is assigned to the index
Only index folders of this index are checked against the document. If the document does not belong to the index, null is returned.
Parameters:
documentRid - resource ID of the document to get the index folder for
Returns:
index folder for the document

getResourceInfo

public java.lang.String getResourceInfo(IResource resource)
                                 throws ResourceException
Returns information about the resource with respect to the actual index e.g. the status of the document as well as general about the index e.g. its service types. A NullPointerException is returned, if resource is null.
Parameters:
resource - resource to investigate
Returns:
description about the resource and the index
Throws:
ResourceException - exception raised in failure situation

setSchedulerTimeTable

public void setSchedulerTimeTable(ISchedulerTimeTable schedulerTimeTable)
                           throws WcmException
Registers a schedule for delta index crawling for the index with the ISchedulerTimeTable. Thereby it sets this schedule for all data sources with no own schedule. Remark: It is recommended to use the similar method of the IIndexService instead of this method.
Parameters:
schedulerTimeTablePar - ISchedulerTimeTable
Throws:
WcmException - in case of an error.

getSchedulerTimeTable

public ISchedulerTimeTable getSchedulerTimeTable()
                                          throws WcmException
Returns the timetable of a schedule for delta index crawling for the index. Returns null in case that no schedule is defined for the index. Remark: It is recommended to use the similar method of the IIndexService instead of this method.
Returns:
ISchedulerTimeTable
Throws:
WcmException - in case of an error.

isActive

public boolean isActive()

setActive

public boolean setActive(boolean isActive)
                  throws WcmException

setActiveDuringStartup

public void setActiveDuringStartup(boolean isActive)
                            throws WcmException

setInactiveIndexHasChanged

public void setInactiveIndexHasChanged()
                                throws WcmException,
                                       ResourceException
Sets a property on true, if index documents have changed during index was inactive. The property is automatically deleted, if the index is reactivated, but the method for index reactivation returns true in that case, indicating that the index should be updated.
Throws:
WcmException - in case of an error
ResourceException - in case of an error

getRID

public RID getRID()
           throws WcmException
Gets the resource ID of the resource representation of this index. Can return null if no indexmanagement repository prefix is configured.
Returns:
resource ID of this index
Throws:
WcmException - in case of an error.

setStateAndNumberOfCrawler

public void setStateAndNumberOfCrawler(AbstractIndex.IndexingState state,
                                       int numOfCrawler)
                                throws WcmException

setIndexingState

public void setIndexingState(AbstractIndex.IndexingState state)
                      throws WcmException

getIndexingState

public AbstractIndex.IndexingState getIndexingState()
                                             throws WcmException

reduceNumberOfCrawler

public int reduceNumberOfCrawler()
                          throws WcmException

typeShouldBeIndexed

public boolean typeShouldBeIndexed(IResource resource)
Parameters:
resource -  
Returns:
 

getWhatToIndexString

public java.lang.String getWhatToIndexString()
Returns:
 

setWhatToIndex

public void setWhatToIndex(java.lang.String whatToIndex)
Parameters:
whatToIndex -  

indexInternalLinks

public boolean indexInternalLinks()

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.