src/it/flosslab/dao/indexer/IndexerDAO.java
public void delete(String indexRoot, String documentId) throws LockObtainFailedException{
		Directory dir = null;
		Analyzer analyzer = new SimpleAnalyzer();
		IndexWriter writer = null;
		QueryParser parser = new QueryParser("documento_id", new SimpleAnalyzer());
		Query query = null;
		try {
			dir = FSDirectory.getDirectory(indexRoot);
			writer = new IndexWriter(dir, analyzer, false, MaxFieldLength.UNLIMITED);
			query = parser.parse(documentId);
			writer.deleteDocuments(query);
			writer.optimize();
			writer.close();
		} catch (ParseException e) {
			e.printStackTrace();
		} catch (CorruptIndexException e) {
			e.printStackTrace();
		}catch (IOException e) {
			e.printStackTrace();
		}
		
		
	}
/**
	 * Index files form the resourcelocation recursively and store the index at
	 * the indexRoot position
	 * @param indexRoot
	 * @param documentId
	 * @throws LockObtainFailedException
	 */
Index files form the resourcelocation recursively and store the index at
the indexRoot position
@param indexRoot
@param documentId
@throws LockObtainFailedException
Index files form the resourcelocation recursively and store the index at the indexRoot position @param indexRoot @param documentId @throws LockObtainFailedException
public void delete(String indexRoot, String documentId) throws LockObtainFailedException{
		Directory dir = null;
		Analyzer analyzer = new SimpleAnalyzer();
		IndexWriter writer = null;
		QueryParser parser = new QueryParser("documento_id", new SimpleAnalyzer());
		Query query = null;
		try {
			dir = FSDirectory.getDirectory(indexRoot);
			writer = new IndexWriter(dir, analyzer, false, MaxFieldLength.UNLIMITED);
			query = parser.parse(documentId);
			writer.deleteDocuments(query);
			writer.optimize();
			writer.close();
		} catch (ParseException e) {
			e.printStackTrace();
		} catch (CorruptIndexException e) {
			e.printStackTrace();
		}catch (IOException e) {
			e.printStackTrace();
		}
	}
public void delete ( String indexRoot , String documentId ) throws LockObtainFailedException { Directory dir = null ; Analyzer analyzer = new SimpleAnalyzer ( ) ; IndexWriter writer = null ; QueryParser parser = new QueryParser ( "documento_id" , new SimpleAnalyzer ( ) ) ; Query query = null ; try { dir = FSDirectory . getDirectory ( indexRoot ) ; writer = new IndexWriter ( dir , analyzer , false , MaxFieldLength . UNLIMITED ) ; query = parser . parse ( documentId ) ; writer . deleteDocuments ( query ) ; writer . optimize ( ) ; writer . close ( ) ; } catch ( ParseException e ) { e . printStackTrace ( ) ; } catch ( CorruptIndexException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } }
Index files form the resourcelocation recursively and store the index at
 the indexRoot position
 @param indexRoot
 @param documentId
 @throws LockObtainFailedException
Index files form the resourcelocation recursively and store the index at the indexRoot position @param indexRoot @param documentId @throws LockObtainFailedException