001package org.kuali.ole.docstore.discovery.service;
002
003/**
004 * Class for administrative or maintenance services.
005 * User: tirumalesh.b
006 * Date: 23/12/11 Time: 11:26 AM
007 */
008public interface AdminService {
009
010    /**
011     * Optimizes the given index. (In solr, it is called core.)
012     *
013     * @param indexName
014     */
015    public void optimize(String indexName) throws Exception;
016
017    /**
018     * Optimizes all available indexes.
019     */
020    public void optimize() throws Exception;
021
022    /**
023     * Optimize the indexes according to params
024     *
025     * @param waitFlush
026     * @param waitSearcher
027     * @throws Exception waitFlush      Default is true. Blocks until index changes are flushed to disk.
028     *                   waitSearcher Default is true. Blocks until a new searcher is opened and registered as
029     *                   the main query searcher, making the changes visible.
030     */
031    public void optimize(Boolean waitFlush, Boolean waitSearcher) throws Exception;
032
033
034}