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

Expose proximity boosting #33382

Closed
jpountz opened this issue Sep 4, 2018 · 4 comments · Fixed by #39385
Closed

Expose proximity boosting #33382

jpountz opened this issue Sep 4, 2018 · 4 comments · Fixed by #39385
Assignees
Labels
>feature :Search Relevance/Ranking Scoring, rescoring, rank evaluation. Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch

Comments

@jpountz
Copy link
Contributor

jpountz commented Sep 4, 2018

In addition to static features (ctr, pagerank, url length) it is common to also want to boost by recency or geo-distance, which are going to perform differently on every request depending on the current time or on the location of the user that runs the query.

Lucene just added support for efficient boosting by recency and plans to add something similar for boosting by geo-distance.

How should we expose it in Elasticsearch?

Relates #27588
cc @polyfractal @mayya-sharipova

@jpountz jpountz added >feature :Search Relevance/Ranking Scoring, rescoring, rank evaluation. team-discuss labels Sep 4, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@mayya-sharipova
Copy link
Contributor

@jpountz Thanks for developing this query. LongPoint.newDistanceFeatureQuery seems to useful indeed. It looks to be similar to decay functions in Function Score query, but seems to be computed much more efficiently. Is the plan for this query to support only saturation function?

About exposing I think it is good to have this query by itself on long fields, but also I am wondering if we can take advantage of it in function score query/

@jpountz
Copy link
Contributor Author

jpountz commented Sep 6, 2018

Is the plan for this query to support only saturation function?

For now yes since this is the only function that was proposed in "Relevance weighting for query independent evidence" that allowed to incorporate features that are inversely correlated with the score (the longer the distance, the lower the score contribution).

@jpountz
Copy link
Contributor Author

jpountz commented Sep 24, 2018

We discussed in the search/aggs meeting. We are also in the process of replacing function_score with a scripting context that would make applying decays easy. We still think it would be nice to have both since they have different trade-offs: scripts would be more flexible but slower since they can't skip non-competitive hits like these new queries can.

One open question left is whether we should have 1 or 3 different queries to handle boosting numbers, dates and geo-points. The main issue is that these queries take a pivot distance as a parameter that would be a number for numeric fields, a duration for date fields and a geo distance for geo-point fields.

@mayya-sharipova mayya-sharipova self-assigned this Feb 15, 2019
mayya-sharipova added a commit to mayya-sharipova/elasticsearch that referenced this issue Feb 26, 2019
Expose DistanceFeatureQuery for long, geo and date types

Closes elastic#33382
mayya-sharipova added a commit that referenced this issue Mar 19, 2019
Expose DistanceFeatureQuery for geo, date and date_nanos types

Closes #33382
mayya-sharipova added a commit to mayya-sharipova/elasticsearch that referenced this issue Mar 20, 2019
Expose DistanceFeatureQuery for geo, date and date_nanos types

Closes elastic#33382
mayya-sharipova added a commit that referenced this issue Mar 20, 2019
Expose DistanceFeatureQuery for geo, date and date_nanos types

Closes #33382
@javanna javanna added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>feature :Search Relevance/Ranking Scoring, rescoring, rank evaluation. Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants