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

Rank_feature query should support sparse_vector field type #104090

Closed
kderusso opened this issue Jan 8, 2024 · 6 comments
Closed

Rank_feature query should support sparse_vector field type #104090

kderusso opened this issue Jan 8, 2024 · 6 comments
Labels
:EnterpriseSearch/Application Enterprise Search :Search/Search Search-related issues that do not fall into other categories Team:Enterprise Search Meta label for Enterprise Search team Team:Search Meta label for search team

Comments

@kderusso
Copy link
Member

kderusso commented Jan 8, 2024

The rank_feature query boosts relevance scores based on numeric values of rank_feature or rank_features fields.

We should update this so it will also work with sparse_vector fields.

@kderusso kderusso added :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team :EnterpriseSearch/Application Enterprise Search Team:Enterprise Search Meta label for Enterprise Search team labels Jan 8, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ent-search-eng (Team:Enterprise Search)

@benwtrent
Copy link
Member

This is indeed interesting. I would hope we move sparse_vector further away from rank_features in the future. This could be done by adjusting how values are indexed, etc. and forcing us to have to support rank_feature queries could hamper that for very little gain.

What do you think @jpountz ?

@jpountz
Copy link
Contributor

jpountz commented Jan 10, 2024

@benwtrent Agreed, I'd rather preserve the ability to diverge these two fields in the future as they feel like they address different problems. That said, do we already have a query that allows computing the maximum inner product between a query vector and indexed vectors easily? Something like that may be a useful addition (and effectively be the same as a rank_features query with linear function internally)?

@benwtrent
Copy link
Member

That said, do we already have a query that allows computing the maximum inner product between a query vector and indexed vectors easily?

I don't think so. Right now the way to do it is a "bool[term1(boost1),...,termn(boostn)]". So, maybe we add a "sparse_vector" query?

@kderusso
Copy link
Member Author

Closing this issue, as we decided to introduce a sparse_vector query instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:EnterpriseSearch/Application Enterprise Search :Search/Search Search-related issues that do not fall into other categories Team:Enterprise Search Meta label for Enterprise Search team Team:Search Meta label for search team
Projects
None yet
Development

No branches or pull requests

4 participants