[MGNLEESOLR-162] SolrQueryBuilder#search() should print errors at the proper level Created: 04/Apr/22  Updated: 25/Jul/23  Resolved: 24/Jul/23

Status: Closed
Project: Solr Search Provider
Component/s: None
Affects Version/s: 5.6
Fix Version/s: 6.1.6

Type: Bug Priority: Neutral
Reporter: Richard Gange Assignee: Milan Divilek
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 1h Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
relation
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLEESOLR-214 Implementation Sub-task Completed Milan Divilek  
MGNLEESOLR-215 Review Sub-task Closed Oanh Thai Hoang  
MGNLEESOLR-216 preintQA Sub-task Closed Oanh Thai Hoang  
MGNLEESOLR-217 QA Sub-task Completed Phong Le Quoc  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Epic Link: Support
Sprint: DevX 42
Story Points: 0.05
Team: DeveloperX
Work Started:
Approved:
Yes

 Description   

Currently the code only outputs search errors at a DEBUG level.

    public String search() {
        try {
            log.debug("Client name [{}].", clientName);
            log.debug("Solr query [{}].", solrQuery);
            QueryRequest req = new QueryRequest(solrQuery);
            SolrClient solrClient = magnoliaSolrBridge.getSolrClient(clientName);
            NoOpResponseParser rawJsonResponseParser = new NoOpResponseParser(CommonParams.JSON);
            req.setResponseParser(rawJsonResponseParser);
            String response = (String) solrClient.request(req).get("response");
            log.debug("Response: {}]", response);
            return response;
        } catch (Exception e) {
            log.debug("Query to solr failed. ", e);  // <-- Should be ERROR level
            return null;
        }

See SolrQueryBuilder line 773.


Generated at Mon Feb 12 11:00:43 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.