Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ua/org.eclipse.help.base/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ Require-Bundle: org.eclipse.ant.core;bundle-version="[3.2.200,4.0.0)";resolution
org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
org.eclipse.help;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
org.eclipse.core.net;bundle-version="[1.2.200,2.0.0)",
org.apache.lucene.analysis-common;bundle-version="[9.5.0,10.0.0)",
org.apache.lucene.core;bundle-version="[9.5.0,10.0.0)",
org.apache.lucene.analysis-smartcn;bundle-version="[9.5.0,10.0.0)"
org.apache.lucene.analysis-common;bundle-version="[9.5.0,11.0.0)",
org.apache.lucene.core;bundle-version="[9.5.0,11.0.0)",
org.apache.lucene.analysis-smartcn;bundle-version="[9.5.0,11.0.0)"
Import-Package: org.eclipse.equinox.http.jetty;resolution:=optional
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Expand Down
2 changes: 1 addition & 1 deletion ua/org.eclipse.ua.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: User Assistance Test
Bundle-SymbolicName: org.eclipse.ua.tests;singleton:=true
Bundle-Version: 3.6.400.qualifier
Bundle-Version: 3.6.500.qualifier
Require-Bundle: org.eclipse.help.ui,
org.eclipse.help.webapp,
org.eclipse.test.performance,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexFormatTooOldException;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.TopDocs;
Expand Down Expand Up @@ -121,10 +122,22 @@ private void checkReadable(String indexPath) throws IOException,
IndexSearcher searcher;
try (Directory luceneDirectory = new NIOFSDirectory(new File(filePath).toPath())) {
try (DirectoryReader luceneDirectoryReader = DirectoryReader.open(luceneDirectory)) {
// This code never reached because the index is not
// readable.
searcher = new IndexSearcher(luceneDirectoryReader);
TopDocs hits = searcher.search(luceneQuery, 500);
assertTrue(hits.totalHits.value >= 1);
assertTrue(hits.totalHits != null);
}
} catch (IndexFormatTooOldException ex) {
// Lucene 10.x throws this more explicit exception whereas 9.x
// throws IllegalArgumentException.
// Note that in
// org.eclipse.help.internal.search.SearchIndex.SearchIndex(File,
// String, AnalyzerDescriptor, TocManager, String)
// it catches all these:
// catch (IndexFormatTooOldException | IndexNotFoundException |
// IllegalArgumentException e)
throw new IllegalArgumentException(ex);
}
} else {
fail("Cannot resolve to file protocol");
Expand Down
2 changes: 1 addition & 1 deletion ua/org.eclipse.ua.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</parent>
<groupId>org.eclipse.ua</groupId>
<artifactId>org.eclipse.ua.tests</artifactId>
<version>3.6.400-SNAPSHOT</version>
<version>3.6.500-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>

<properties>
Expand Down
Loading