164165166167168169170171172173174
} } finally { // if documents where added to the index create a reopen file and // optimize the writer log.debug("Number of indexed Synonyms finished: " + synonymWriter.numDocs()); synonymAccessor.release(synonymWriter); } log.debug("Finished reindexing synonym index."); ucReIndex.stop(); } catch (Exception e) {
183184185186187188189190191192193
for (int i = 0; i < searchedAttributes.length; i++) { query = query + " OR " + searchedAttributes[i] + ":" + d.get("Synonym"); } } } finally { ia.release(synonymSearcher); ia.release(synonymReader, false); } return query; }
184185186187188189190191192193194
query = query + " OR " + searchedAttributes[i] + ":" + d.get("Synonym"); } } } finally { ia.release(synonymSearcher); ia.release(synonymReader, false); } return query; }
5859606162636465666768
autocompleteLocation.resetIndexJobCreationTimes(); autocompleteLocation.createReopenFile(); } catch (IOException e) { log.error("Could not clear index", e); } finally { ia.release(writer); } log.debug("Finished clearing index."); }
110111112113114115116117118119120
} finally { sia.release(sourceReader, false); // close writer aia.release(writer); // aia.release(reader,false); } log.debug("Finished reindexing autocomplete index."); ucReIndex.stop(); }
162163164165166167168169170171172
bean.set(SOURCE_WORD_FIELD, d.get(SOURCE_WORD_FIELD)); bean.set(COUNT_FIELD, d.get(COUNT_FIELD)); result.add(bean); } } finally { ia.release(autoCompleteSearcher); ia.release(autoCompleteReader, false); } return result; }
163164165166167168169170171172173
bean.set(COUNT_FIELD, d.get(COUNT_FIELD)); result.add(bean); } } finally { ia.release(autoCompleteSearcher); ia.release(autoCompleteReader, false); } return result; }
188189190191192193194195196197198
reopened = true; lastupdatestored = lastupdate; } } } finally { ia.release(reader, false); } if (reopened) { reIndex();
263264265266267268269270271272273
} finally { sia.release(sourceReader, false); // close writer aia.release(writer); // aia.release(reader,false); } autocompleteLocation.createReopenFile(); log.debug("Finished reindexing autocomplete index."); ucReIndex.stop();