imtiaotiao opened a new issue, #59888:
URL: https://github.com/apache/doris/issues/59888

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   4.0.2
   
   ### What's Wrong?
   
   I want to use the full-text index feature and sort the results by relevance 
score. According to the official documentation, you must include at least a 
MATCH or SEARCH function in the WHERE clause to use the relevance scoring 
functions. So I execute this SQL:
   
   ```sql
   SELECT `key` as pri, '%s' tbn, SCORE() as sc 
   FROM `project_test`.`entity_test_entity` 
   WHERE search("name:张三")
   ORDER BY sc DESC
   LIMIT 100
   ```
   
   But the doris report an error: 
   
   > Execution failed: Error Failed to execute sql: java.sql.SQLException: 
(conn=407) errCode = 2, detailMessage = WHERE clause must contain at least one 
MATCH function for score() push down optimization
   
   ### What You Expected?
   
   If possible, please take some time to investigate and fix the bug in this 
feature. Thank you!
   
   ### How to Reproduce?
   
   As the above example, it will be reproduced.
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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