airborne12 opened a new pull request, #60785:
URL: https://github.com/apache/doris/pull/60785

   ### What problem does this PR solve?
   
   Issue Number: close #DORIS-24352
   
   Problem Summary:
   When using `search()` with an invalid `mode` value in the options JSON 
(e.g., `"mode":"lucenedfafa"`), the query silently falls back to standard mode 
instead of reporting an error. This makes it difficult for users to detect 
typos or misconfiguration.
   
   This PR adds validation in `SearchOptions.validate()` to reject any mode 
value other than `"standard"` or `"lucene"`, throwing a clear error message.
   
   ### Release note
   
   Fix search() DSL to report an error when an invalid mode value is specified 
instead of silently falling back to standard mode.
   
   ### Check List (For Author)
   
   - Test
       - [ ] Regression test
       - [x] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason
   
   - Behavior changed:
       - [x] Yes. Previously, invalid mode values were silently accepted and 
treated as "standard" mode. Now they throw an `IllegalArgumentException` with a 
descriptive message.
   
   - Does this need documentation?
       - [x] No.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to