KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > snapper > api > Indexer


1 package org.enhydra.snapper.api;
2
3 import java.io.*;
4
5 /**
6  * Indexer is an indexing service. For example, Lucene indexing engine
7    * @param siteName the name of the index directory
8    * @param language the indexing language to use
9    * @param locations vector representing paths to folders being indexed (they belong to a site)
10    * @param create <code>true</code> to create the index or overwrite
11    * the existing one; <code>false</code> to append to the existing
12    * index
13    * @throws IOException if the directory cannot be read/written to, or
14    * if it does not exist, and <code>create</code> is
15    * <code>false</code>
16    * @author Igor Smirnov
17    */

18
19 public interface Indexer{
20     
21     //local folder indexing
22

23     void setUpIndexer(String JavaDoc siteName, String JavaDoc language, boolean create, int maxLength) throws IOException;
24     
25     void setMaxAge(String JavaDoc age);
26     
27     void setMaxSize(String JavaDoc size);
28     
29     //void indexDoc(File file, String text, String type, String title, String properties, String metadata) throws IOException;
30

31     void indexDoc(long timestamp, String JavaDoc path, String JavaDoc text, String JavaDoc type, String JavaDoc title, String JavaDoc properties, String JavaDoc metadata, String JavaDoc fileName) throws IOException;
32         
33     void optimize();
34     
35     void close();
36
37     
38 }
39
40
41
42   
43
Popular Tags