Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSopot Cela2017-02-21 14:56:25 +0000
committerSopot Cela2017-02-21 14:56:25 +0000
commit96c4b1f19fc1726876cd6bf6cf840f2f7ddd6af2 (patch)
tree5c7b962589d9c6495bd9527b21212a94991bd852
parent95eff73c60193d29b321886b46e941d4180389b2 (diff)
downloadeclipse.platform.ua-96c4b1f19fc1726876cd6bf6cf840f2f7ddd6af2.tar.gz
eclipse.platform.ua-96c4b1f19fc1726876cd6bf6cf840f2f7ddd6af2.tar.xz
eclipse.platform.ua-96c4b1f19fc1726876cd6bf6cf840f2f7ddd6af2.zip
Change-Id: I183b9197ee32c093deb7400aac640ccb2ac59ae3 Signed-off-by: Sopot Cela <scela@redhat.com>
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
index 3ab7e7a60..339d2f1f4 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
@@ -329,13 +329,13 @@ public class SearchIndex implements IHelpSearchIndex {
*/
public synchronized boolean beginDeleteBatch() {
try {
- if (ir != null) {
- ir.close();
+ if (iw != null) {
+ iw.close();
}
indexedDocs = new HelpProperties(INDEXED_DOCS_FILE, indexDir);
indexedDocs.restore();
setInconsistent(true);
- ir = DirectoryReader.open(luceneDirectory);
+ iw = new IndexWriter(luceneDirectory, new IndexWriterConfig(analyzerDescriptor.getAnalyzer()));
return true;
} catch (IOException e) {
HelpBasePlugin.logError("Exception occurred in search indexing at beginDeleteBatch.", e); //$NON-NLS-1$
@@ -422,10 +422,10 @@ public class SearchIndex implements IHelpSearchIndex {
*/
public synchronized boolean endDeleteBatch() {
try {
- if (ir == null)
+ if (iw == null)
return false;
- ir.close();
- ir = null;
+ iw.close();
+ iw = null;
// save the update info:
// - all the docs
// - plugins (and their version) that were indexed

Back to the top