File tree 2 files changed +12
-2
lines changed
stroom-index-lucene553/src/main/java/stroom/index/lucene553
stroom-index-lucene980/src/main/java/stroom/index/lucene980
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 23
23
import stroom .util .io .FileUtil ;
24
24
import stroom .util .io .PathCreator ;
25
25
26
+ import org .apache .lucene553 .index .CorruptIndexException ;
26
27
import org .apache .lucene553 .index .IndexWriter ;
27
28
import org .apache .lucene553 .search .IndexSearcher ;
28
29
import org .apache .lucene553 .search .SearcherFactory ;
@@ -111,8 +112,12 @@ class IndexShardSearcher {
111
112
searcherManager .release (indexSearcher );
112
113
}
113
114
}
115
+ } catch (final CorruptIndexException e ) {
116
+ throw new SearchException ("Corrupt index shard (id=" + indexShard .getId () + "). " + e .getMessage (),
117
+ e );
114
118
} catch (final IOException e ) {
115
- throw new SearchException (e .getMessage (), e );
119
+ throw new SearchException ("Error reading index shard (id=" + indexShard .getId () + "). " + e .getMessage (),
120
+ e );
116
121
}
117
122
118
123
this .directory = directory ;
Original file line number Diff line number Diff line change 23
23
import stroom .util .io .FileUtil ;
24
24
import stroom .util .io .PathCreator ;
25
25
26
+ import org .apache .lucene980 .index .CorruptIndexException ;
26
27
import org .apache .lucene980 .index .IndexWriter ;
27
28
import org .apache .lucene980 .search .IndexSearcher ;
28
29
import org .apache .lucene980 .search .SearcherFactory ;
@@ -111,8 +112,12 @@ class IndexShardSearcher {
111
112
searcherManager .release (indexSearcher );
112
113
}
113
114
}
115
+ } catch (final CorruptIndexException e ) {
116
+ throw new SearchException ("Corrupt index shard (id=" + indexShard .getId () + "). " + e .getMessage (),
117
+ e );
114
118
} catch (final IOException e ) {
115
- throw new SearchException (e .getMessage (), e );
119
+ throw new SearchException ("Error reading index shard (id=" + indexShard .getId () + "). " + e .getMessage (),
120
+ e );
116
121
}
117
122
118
123
this .directory = directory ;
You can’t perform that action at this time.
0 commit comments