You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by ke...@apache.org on 2002/09/23 10:13:34 UTC

cvs commit: jakarta-lucene-sandbox/contributions/fulcrum LuceneSearchService.java

kelvint     2002/09/23 01:13:34

  Modified:    contributions/fulcrum LuceneSearchService.java
  Log:
  Removed or otherwise commented out dependency on appex/Indyo.
  
  Revision  Changes    Path
  1.3       +2 -58     jakarta-lucene-sandbox/contributions/fulcrum/LuceneSearchService.java
  
  Index: LuceneSearchService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene-sandbox/contributions/fulcrum/LuceneSearchService.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LuceneSearchService.java	25 May 2002 10:19:22 -0000	1.2
  +++ LuceneSearchService.java	23 Sep 2002 08:13:34 -0000	1.3
  @@ -5,16 +5,10 @@
   import org.apache.lucene.analysis.standard.StandardAnalyzer;
   import org.apache.lucene.search.*;
   
  -import search.SearchIndexer;
  -
   import java.io.IOException;
   
   /**
    * Implementation of {@link SearchService}.
  - * <p>
  - * <b>Note that this implementation uses code from
  - * /projects/appex/search.</b>
  - * </p>
    */
   public class LuceneSearchService
           extends org.apache.fulcrum.BaseService implements SearchService
  @@ -42,8 +36,7 @@
   
       public void init() throws InitializationException
       {
  -        searchIndexLocation = getConfiguration().getString(
  -                SearchService.INDEX_LOCATION_KEY);
  +        searchIndexLocation = getConfiguration().getString(SearchService.INDEX_LOCATION_KEY);
           setInit(true);
       }
   
  @@ -113,19 +106,7 @@
   
       public void batchIndex() throws ServiceException
       {
  -        try
  -        {
  -            acquireIndexLock();
  -            new IndexerThread(new SearchIndexer(), this);
  -        }
  -        catch (IOException ioe)
  -        {
  -            throw new ServiceException("Error encountered indexing!", ioe);
  -        }
  -        catch (InterruptedException ie)
  -        {
  -            throw new ServiceException("Error encountered indexing!", ie);
  -        }
  +        throw new UnsupportedOperationException();
       }
   
       public boolean isIndexing()
  @@ -154,42 +135,5 @@
       protected synchronized void releaseIndexLock()
       {
           indexLocked = false;
  -    }
  -}
  -
  -class IndexerThread extends Thread
  -{
  -    private static Category cat = Category.getInstance(IndexerThread.class);
  -
  -    private SearchIndexer indexer;
  -    private LuceneSearchService service;
  -
  -    public IndexerThread()
  -    {
  -        super();
  -    }
  -
  -    public IndexerThread(SearchIndexer indexer, LuceneSearchService service)
  -        throws InterruptedException
  -    {
  -        service.acquireIndexLock();
  -        this.indexer = indexer;
  -        start();
  -    }
  -
  -    public void run()
  -    {
  -        try
  -        {
  -            indexer.index();
  -        }
  -        catch (Exception e)
  -        {
  -            cat.error("Error indexing: " + e.getMessage(), e);
  -        }
  -        finally
  -        {
  -            service.releaseIndexLock();
  -        }
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>