lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject cvs commit: jakarta-lucene-sandbox/contributions/fulcrum LuceneSearchService.java
Date Mon, 23 Sep 2002 08:13:34 GMT
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:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message