# o19s/elasticsearch-learning-to-rank

Plugin to integrate Learning to Rank (aka machine learning for better relevance) with Elasticsearch

Repository: https://github.com/o19s/elasticsearch-learning-to-rank
Canonical: https://ross.abutalabs.com/products/elasticsearch-learning-to-rank
Homepage: http://opensourceconnections.com/blog/2017/02/14/elasticsearch-learning-to-rank/
Language: Java
License: Apache-2.0
License Family: permissive
Topics: elasticsearch, relevant-search, machine-learning, search-relevance, elasticsearch-plugin, elasticsearch-plugins
Last push: 2026-06-16T12:25:10+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 87, release rhythm 89, longevity 100
- inputs: {"age_days": 3538, "days_push": 78, "days_rel": 78, "gap_med": 9.5, "n_releases_24m": 17}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1521, forks 372 (observed 2026-08-28T04:04:57.909199+00:00)

## What it is
An Elasticsearch plugin that integrates Learning to Rank (machine-learned relevance) into Elasticsearch. It stores feature query templates, logs feature scores for training set creation, and applies stored linear, XGBoost, or RankLib models to rerank search results.

## Use cases
- improve search relevance ranking with machine learning in elasticsearch
- train a learning-to-rank model for my search engine
- rerank elasticsearch results using xgboost
- log feature scores to build a training set for search relevance
- store and deploy ranking models in elasticsearch
- replace manual relevance tuning with automated ranking

## When to choose
- you run Elasticsearch and want ML-driven relevance instead of manual boost tuning
- you have click/judgment data to train ranking models offline
- you need feature logging to build training sets from query templates

## When to avoid
- you use OpenSearch or Solr rather than Elasticsearch (though a Solr LTR exists)
- you need vector/neural semantic search rather than feature-based LTR
- you cannot operate offline model training pipelines

## Facets
- artifact type: plugin
- maturity: active
- function: search-engine, machine-learning, plugin-system
- domain: machine-learning, developer-tools
- platform: jvm, self-hosted
- tags: elasticsearch-plugin, learning-to-rank, search-relevance, ltr, xgboost, ranklib, search

## Member repositories
- o19s/elasticsearch-learning-to-rank (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:57.909199+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:31:52.653372+00:00, confidence not recorded.
  - readme: https://github.com/o19s/elasticsearch-learning-to-rank (fetched 2026-08-28T04:04:57.909199+00:00, sha 3604443ca732)
  - homepage: http://opensourceconnections.com/blog/2017/02/14/elasticsearch-learning-to-rank/ (fetched 2026-08-29T11:35:08.574493+00:00, sha a912c1c893dc)
  - site_page: https://opensourceconnections.com/about-us (fetched 2026-08-29T11:35:08.584247+00:00, sha 1f2c9b427d52)
  - site_page: https://opensourceconnections.com/about-us/careers-eu (fetched 2026-08-29T11:35:08.586266+00:00, sha 181bc53f9eba)
  - site_page: https://opensourceconnections.com/about-us/careers (fetched 2026-08-29T11:35:08.588059+00:00, sha 1c35ee569f3a)
  - site_page: https://opensourceconnections.com/about-us/books-resources (fetched 2026-08-29T11:35:08.589885+00:00, sha 858bf2655425)
  - site_page: https://opensourceconnections.com/about-us/tools (fetched 2026-08-29T11:35:08.591559+00:00, sha 26120bbbf338)
  - site_page: https://opensourceconnections.com/about-us/videos-about-search (fetched 2026-08-29T11:35:08.593202+00:00, sha 34acf57d4dda)
- Data as of 2026-08-30T08:39:29.467469+00:00.
