[Bug] Report error when use Relevance Score function and search function for FULLTEXT Search
- Dominant language
- Java
- Stars
- 15.9k
- Forks
- 3.9k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 520
Description
### 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)
Contributor guide
Assessment
This issue has not been assessed yet.