KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > indexing > IndexingService


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.services.indexing;
6
7 import java.util.* ;
8 import org.apache.lucene.document.Document;
9 import org.apache.lucene.analysis.Analyzer;
10 import org.apache.lucene.index.Term;
11 /**
12  * Created by The eXo Platform SARL .
13  * Author : Tuan Nguyen
14  * tuan08@users.sourceforge.net
15  * Date: Sept 14, 2004
16  * Time: 1:12:22 PM
17  */

18 public interface IndexingService {
19   final static public String JavaDoc PREFIX = "document-" ;
20   final static public String JavaDoc IDENTIFIER_FIELD = PREFIX + "identifier" ;
21   final static public String JavaDoc AUTHOR_FIELD = PREFIX + "author" ;
22   final static public String JavaDoc MODULE_FIELD = PREFIX + "module" ;
23   final static public String JavaDoc TITLE_FIELD = PREFIX + "title" ;
24   final static public String JavaDoc DESCRIPTION_FIELD = PREFIX + "description" ;
25   final static public String JavaDoc DOCUMENT_FIELD = PREFIX + "body" ;
26   final static public String JavaDoc DOCUMENT_ACCESS_ROLE = PREFIX + "accessRole" ;
27   
28   public Analyzer getAnalyzer() ;
29   
30   public String JavaDoc getIndexDatabaseLocation() ;
31   
32   public void addIndexerPlugin(IndexerPlugin plugin) ;
33   public Collection getIndexerPlugins() throws Exception JavaDoc ;
34   public IndexerPlugin getIndexerPlugin(String JavaDoc identifer) throws Exception JavaDoc ;
35  
36   public void queueUpdateDocument(Document document) throws Exception JavaDoc ;
37   public void queueUpdateDocuments(List documents) throws Exception JavaDoc ;
38   
39   public void queueIndexDocument(Document document) throws Exception JavaDoc ;
40   public void queueIndexDocuments(List documents) throws Exception JavaDoc ;
41   
42   public void queueDeleteDocuments(Term queryTerm) throws Exception JavaDoc ;
43   
44   public Searcher getSearcher() throws Exception JavaDoc ;
45   
46   public void optimizeDatabase() throws Exception JavaDoc ;
47 }
Popular Tags