public static void indexarDocumentos(CharArraySet stopWord) throws Exception {

		IndexWriter iwriter = null;
		try {
			if (log.isDebugEnabled()){
				log.debug("[ServicioBuscadorDAO][indexarDocumentos] Inicio");
			}
			SpanishAnalyzer analizador = new SpanishAnalyzer(version);
			
			if (stopWord != null){
				analizador = new SpanishAnalyzer(version, stopWord);
			}
			
			Directory directorioIndex = new SimpleFSDirectory(new File(
					TablaValores.getValor(tableParametros, "path", "destino")));
			IndexWriterConfig config = new IndexWriterConfig(version,
					analizador);
			iwriter = new IndexWriter(directorioIndex, config);
			List<Opinion> lista = getListaObjetoOpiniones();
			if (log.isDebugEnabled()){
				log.debug("[ServicioBuscadorDAO][indexarDocumentos] total lista: " + lista.size());
			}
			for (Opinion o : lista) {
				addDoc(iwriter, o);
			}
		} catch (IOException ex) {
			log.warn("[ServicioBuscadorDAO][indexarDocumentos] ERROR: " + ex.getMessage());
			throw ex;
		} catch (Exception e) {
			log.warn("[ServicioBuscadorDAO][indexarDocumentos] ERROR: " + e.getMessage());
			throw e;
		} finally {
			if (iwriter != null)
				iwriter.close();
			if (log.isDebugEnabled()){
				log.debug("[ServicioBuscadorDAO][indexarDocumentos] Fin");
			}
		}
	}