src/it/flosslab/dao/indexer/IndexerDAO.java
public void index(String indexRoot, String resourcelocation)
			throws IOException, ContentParserException {
		boolean isNew = false;
		File segments = new File(this.file_system_index_path, "segments.gen");
		if(!segments.exists()) isNew = true;
		// get Lucene instances
		Directory dir = FSDirectory.getDirectory(indexRoot);
		Analyzer analyzer = new SimpleAnalyzer();
		IndexWriter writer = new IndexWriter(dir, analyzer, isNew,
				MaxFieldLength.UNLIMITED);

		//long start = new Date().getTime();
		// start indexing
	//index(writer, new File(resourcelocation));
		writer.optimize();
		writer.close();
		//long end = new Date().getTime();

		//stats(dir, start, end);

	}
/**
	 * Index files form the resourcelocation recursively and store the index at
	 * the indexRoot position
	 * 
	 * @param indexRoot
	 * @param resourcelocation
	 * @throws IOException
	 * @throws ContentParserException
	 */
Index files form the resourcelocation recursively and store the index at
the indexRoot position

@param indexRoot
@param resourcelocation
@throws IOException
@throws ContentParserException
Index files form the resourcelocation recursively and store the index at the indexRoot position @param indexRoot @param resourcelocation @throws IOException @throws ContentParserException
public void index(String indexRoot, String resourcelocation)
			throws IOException, ContentParserException {
		boolean isNew = false;
		File segments = new File(this.file_system_index_path, "segments.gen");
		if(!segments.exists()) isNew = true;
		Directory dir = FSDirectory.getDirectory(indexRoot);
		Analyzer analyzer = new SimpleAnalyzer();
		IndexWriter writer = new IndexWriter(dir, analyzer, isNew,
				MaxFieldLength.UNLIMITED);
		writer.optimize();
		writer.close();
	}
public void index ( String indexRoot , String resourcelocation ) throws IOException , ContentParserException { boolean isNew = false ; File segments = new File ( this . file_system_index_path , "segments.gen" ) ; if ( ! segments . exists ( ) ) isNew = true ; Directory dir = FSDirectory . getDirectory ( indexRoot ) ; Analyzer analyzer = new SimpleAnalyzer ( ) ; IndexWriter writer = new IndexWriter ( dir , analyzer , isNew , MaxFieldLength . UNLIMITED ) ; writer . optimize ( ) ; writer . close ( ) ; }
Index files form the resourcelocation recursively and store the index at
 the indexRoot position
Index files form the resourcelocation recursively and store the index at the indexRoot position
// get Lucene instances //long start = new Date().getTime(); // start indexing //index(writer, new File(resourcelocation)); //long end = new Date().getTime(); //stats(dir, start, end);