Also delegate rewrite the the wrapped IndexSearcher.
In the the AssertingIndexSearcher is used we then also have extra validation when rewritting the query.
This commit is contained in:
parent
2fecc7e5c9
commit
0688dddebf
|
@ -63,6 +63,16 @@ public class ContextIndexSearcher extends IndexSearcher implements Releasable {
|
||||||
this.dfSource = dfSource;
|
this.dfSource = dfSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Query rewrite(Query original) throws IOException {
|
||||||
|
try {
|
||||||
|
return in.rewrite(original);
|
||||||
|
} catch (Throwable t) {
|
||||||
|
searchContext.clearReleasables(Lifetime.COLLECTION);
|
||||||
|
throw ExceptionsHelper.convertToElastic(t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Weight createNormalizedWeight(Query query, boolean needsScores) throws IOException {
|
public Weight createNormalizedWeight(Query query, boolean needsScores) throws IOException {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue