You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by md...@apache.org on 2020/05/07 22:56:13 UTC
[lucene-solr] branch master updated: SOLR-14465: Solr query
handling code catches FuzzyTermsException
This is an automated email from the ASF dual-hosted git repository.
mdrob pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/master by this push:
new 03a6023 SOLR-14465: Solr query handling code catches FuzzyTermsException
03a6023 is described below
commit 03a60231e8e8570f47d3a64de5c6f03c26e7379a
Author: Mike Drob <md...@apache.org>
AuthorDate: Thu May 7 17:47:03 2020 -0500
SOLR-14465: Solr query handling code catches FuzzyTermsException
This reverts commit 7ea7ed72aca556f957a5de55911c852124db8715.
---
.../java/org/apache/solr/handler/component/QueryComponent.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
index b03997a..9f8b355 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
@@ -215,7 +215,7 @@ public class QueryComponent extends SearchComponent
rb.setFilters( filters );
}
}
- } catch (SyntaxError | FuzzyTermsEnum.FuzzyTermsException e) {
+ } catch (SyntaxError e) {
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, e);
}
@@ -1486,7 +1486,12 @@ public class QueryComponent extends SearchComponent
SolrQueryResponse rsp = rb.rsp;
SolrIndexSearcher searcher = req.getSearcher();
- searcher.search(result, cmd);
+
+ try {
+ searcher.search(result, cmd);
+ } catch (FuzzyTermsEnum.FuzzyTermsException e) {
+ throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, e);
+ }
rb.setResult(result);
ResultContext ctx = new BasicResultContext(rb);