Add debug logging to trace search errors

This commit is contained in:
Nicolas Lalevée 2011-07-19 14:07:37 +02:00 committed by kimchy
parent bf071222ed
commit 65cefb6915
1 changed files with 10 additions and 0 deletions

View File

@ -159,6 +159,7 @@ public class SearchService extends AbstractLifecycleComponent<SearchService> {
contextProcessedSuccessfully(context); contextProcessedSuccessfully(context);
return context.dfsResult(); return context.dfsResult();
} catch (RuntimeException e) { } catch (RuntimeException e) {
logger.debug("Dfs phase failed", e);
freeContext(context); freeContext(context);
throw e; throw e;
} finally { } finally {
@ -181,6 +182,7 @@ public class SearchService extends AbstractLifecycleComponent<SearchService> {
contextProcessedSuccessfully(context); contextProcessedSuccessfully(context);
return context.queryResult(); return context.queryResult();
} catch (RuntimeException e) { } catch (RuntimeException e) {
logger.debug("Scan phase failed", e);
freeContext(context); freeContext(context);
throw e; throw e;
} finally { } finally {
@ -208,6 +210,7 @@ public class SearchService extends AbstractLifecycleComponent<SearchService> {
} }
return new ScrollQueryFetchSearchResult(new QueryFetchSearchResult(context.queryResult(), context.fetchResult()), context.shardTarget()); return new ScrollQueryFetchSearchResult(new QueryFetchSearchResult(context.queryResult(), context.fetchResult()), context.shardTarget());
} catch (RuntimeException e) { } catch (RuntimeException e) {
logger.debug("Scan phase failed", e);
freeContext(context); freeContext(context);
throw e; throw e;
} finally { } finally {
@ -228,6 +231,7 @@ public class SearchService extends AbstractLifecycleComponent<SearchService> {
} }
return context.queryResult(); return context.queryResult();
} catch (RuntimeException e) { } catch (RuntimeException e) {
logger.debug("Query phase failed", e);
freeContext(context); freeContext(context);
throw e; throw e;
} finally { } finally {
@ -244,6 +248,7 @@ public class SearchService extends AbstractLifecycleComponent<SearchService> {
queryPhase.execute(context); queryPhase.execute(context);
return new ScrollQuerySearchResult(context.queryResult(), context.shardTarget()); return new ScrollQuerySearchResult(context.queryResult(), context.shardTarget());
} catch (RuntimeException e) { } catch (RuntimeException e) {
logger.debug("Query phase failed", e);
freeContext(context); freeContext(context);
throw e; throw e;
} finally { } finally {
@ -266,6 +271,7 @@ public class SearchService extends AbstractLifecycleComponent<SearchService> {
contextProcessedSuccessfully(context); contextProcessedSuccessfully(context);
return context.queryResult(); return context.queryResult();
} catch (RuntimeException e) { } catch (RuntimeException e) {
logger.debug("Query phase failed", e);
freeContext(context); freeContext(context);
throw e; throw e;
} finally { } finally {
@ -288,6 +294,7 @@ public class SearchService extends AbstractLifecycleComponent<SearchService> {
} }
return new QueryFetchSearchResult(context.queryResult(), context.fetchResult()); return new QueryFetchSearchResult(context.queryResult(), context.fetchResult());
} catch (RuntimeException e) { } catch (RuntimeException e) {
logger.debug("Fetch phase failed", e);
freeContext(context); freeContext(context);
throw e; throw e;
} finally { } finally {
@ -316,6 +323,7 @@ public class SearchService extends AbstractLifecycleComponent<SearchService> {
} }
return new QueryFetchSearchResult(context.queryResult(), context.fetchResult()); return new QueryFetchSearchResult(context.queryResult(), context.fetchResult());
} catch (RuntimeException e) { } catch (RuntimeException e) {
logger.debug("Fetch phase failed", e);
freeContext(context); freeContext(context);
throw e; throw e;
} finally { } finally {
@ -338,6 +346,7 @@ public class SearchService extends AbstractLifecycleComponent<SearchService> {
} }
return new ScrollQueryFetchSearchResult(new QueryFetchSearchResult(context.queryResult(), context.fetchResult()), context.shardTarget()); return new ScrollQueryFetchSearchResult(new QueryFetchSearchResult(context.queryResult(), context.fetchResult()), context.shardTarget());
} catch (RuntimeException e) { } catch (RuntimeException e) {
logger.debug("Fetch phase failed", e);
freeContext(context); freeContext(context);
throw e; throw e;
} finally { } finally {
@ -358,6 +367,7 @@ public class SearchService extends AbstractLifecycleComponent<SearchService> {
} }
return context.fetchResult(); return context.fetchResult();
} catch (RuntimeException e) { } catch (RuntimeException e) {
logger.debug("Fetch phase failed", e);
freeContext(context); freeContext(context);
throw e; throw e;
} finally { } finally {