Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] SCORE() function to return score instead of _score #1403

Open
acarbonetto opened this issue Mar 7, 2023 · 0 comments
Open

[FEATURE] SCORE() function to return score instead of _score #1403

acarbonetto opened this issue Mar 7, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@acarbonetto
Copy link
Collaborator

Is your feature request related to a problem?
Following the below issues, after adding score() function from the legacy engine (doc), adding PPL and SQL syntax that allows the user to include a function without arguments in place of the _score identifier.

#639
#432

What solution would you like?
The existing SCORE() function requires a relevance search function as the first argument (with an optional boost for the second argument) without really needing one and the boost feature is really irrelevant.

A better solution would be to include a score() function (without arguments) which is synonymous with _score identifier but also allows the user to include the score() function instead of using _score meta-field identifier.

Example:

SELECT SCORE(), * FROM library WHERE MATCH(name, 'dune') ORDER BY SCORE() DESC;

What alternatives have you considered?
This function would be easier to use than the existing SCORE(search, boost) that is already available.

Do you have any additional context?
Add any other context or screenshots about the feature request here.

@acarbonetto acarbonetto added enhancement New feature or request untriaged labels Mar 7, 2023
@dai-chen dai-chen removed the untriaged label Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants