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] script_score sub-type in rerank processor #625

Open
joelthe1 opened this issue Mar 4, 2024 · 6 comments
Open

[FEATURE] script_score sub-type in rerank processor #625

joelthe1 opened this issue Mar 4, 2024 · 6 comments
Assignees
Labels
enhancement Features Introduces a new unit of functionality that satisfies a requirement hybrid search

Comments

@joelthe1
Copy link

joelthe1 commented Mar 4, 2024

Is your feature request related to a problem?

I have successfully setup and run hybrid search using OpenSearch on my data but I want to tune the results so that the results which are larger in (string) length (for a specific field) are boosted slightly over those results which are relatively smaller in length. The motivation for this is that sometimes, semantic search returns results that are much shorter (think a sentence) than a very long query string (think a paragraph of text) and I would like to reduce the relevance of such results.

What solution would you like?

Ability to write my own simple script to rerank like in the script_score function.

What alternatives have you considered?

An inferior alternative would be to use script_score (within function_score ) and compare the length of the query string with the length of the result. But this comparison is different from the request, since it is a comparison between the individual search result and the query. What I want is to compare all the search results with each other using some simple function (like script_score) which is not currently possible.

Do you have any additional context?

Using the Painless scripting language might be more fitting.

@navneet1v
Copy link
Collaborator

@joelthe1 if I understand the feature request properly, you are requesting an ability in re-ranking processor which can run a custom logic on the final search results to re-ranking the documents? is that a correct understanding?

@navneet1v navneet1v moved this from Backlog to Backlog (Hot) in Vector Search RoadMap Apr 1, 2024
@vamshin
Copy link
Member

vamshin commented Apr 1, 2024

@HenryL27 will you be able to take look?

@HenryL27
Copy link
Contributor

HenryL27 commented Apr 1, 2024

I'm not gonna have time for this, no. Sorry

@vamshin
Copy link
Member

vamshin commented Apr 2, 2024

np. @joelthe1 do you think you can help adding this feature?

@joelthe1
Copy link
Author

joelthe1 commented Apr 2, 2024

@joelthe1 if I understand the feature request properly, you are requesting an ability in re-ranking processor which can run a custom logic on the final search results to re-ranking the documents? is that a correct understanding?

Yes @navneet1v, that is correct. Unfortunately, I am not in a position to work on this myself but do think it would benefit more than just me. However, I am able to test things or provide feedback, if useful.

@minalsha minalsha added the Features Introduces a new unit of functionality that satisfies a requirement label Nov 5, 2024
@heemin32
Copy link
Collaborator

@joelthe1 Could you provide more details to clarify the request? For example, an API example and the expected behavior would be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Features Introduces a new unit of functionality that satisfies a requirement hybrid search
Projects
Status: Backlog (Hot)
Development

No branches or pull requests

7 participants