org.compass.core.engine
Interface SearchEngineOptimizer

All Known Subinterfaces:
LuceneSearchEngineOptimizer
All Known Implementing Classes:
AbstractIndexInfoOptimizer, AbstractOptimizer, AdaptiveOptimizer, AggressiveOptimizer, LuceneSearchEngineOptimizerManager, NullOptimizer

public interface SearchEngineOptimizer

Optimizes search engine index data.

Using it, one can controll the lifecycle of the optimizer using the start() and stop() methods (note that does not mean that it will start a scheduled optimizer, it depends on the configuration supplied).

You can also check if the search engine required optimization using the needOptimization() method, and run the optimization process using the optimize() method.

Author:
kimchy

Method Summary
 boolean isRunning()
          Returns true if the optimizer is running.
 void optimize()
          Optimizes the search engine index if it requires optimization.
 void optimize(String subIndex)
          Optimizes the sub index if it requires optimization.
 void start()
          Starts the given optimizer.
 void stop()
          Stops the given optimizer.
 

Method Detail

start

void start()
           throws SearchEngineException
Starts the given optimizer. Will start a scheduled optimizer if configured.

Throws:
SearchEngineException

stop

void stop()
          throws SearchEngineException
Stops the given optimizer. Will stop the scheduled optimizer if configured.

Note that if the optimizer is stopped while optimizing, it might take some time till the optimizer will actually stop.

Throws:
SearchEngineException

isRunning

boolean isRunning()
Returns true if the optimizer is running.

Returns:
true if the optimizer is running

optimize

void optimize()
              throws SearchEngineException
Optimizes the search engine index if it requires optimization.

Throws:
SearchEngineException

optimize

void optimize(String subIndex)
              throws SearchEngineException
Optimizes the sub index if it requires optimization.

Parameters:
subIndex - The sub index to optimize
Throws:
SearchEngineException


Copyright (c) 2004-2008 The Compass Project.