# OpenSearch Learning to Rank plugin

**URL:** https://forum.opensearch.org/t/opensearch-learning-to-rank-plugin/6847
**Category:** OpenDistro
**Created:** [August 24, 2021, 7:50pm UTC](https://forum.opensearch.org/t/opensearch-learning-to-rank-plugin/6847 "2021-08-24T19:50:27Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![aparo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/aparo/32/224_2.png) [@aparo](https://forum.opensearch.org/u/aparo)
#### Post date: [August 24, 2021, 7:50pm UTC](https://forum.opensearch.org/t/opensearch-learning-to-rank-plugin/6847/1 "2021-08-24T19:50:27Z")

</div>

During this evening meetup, It was requested to port [Elasticsearch Learning to Rank plugin](https://github.com/o19s/elasticsearch-learning-to-rank) to Opendistro.

I published a fork update to 7.10 version and initial working binaries at [opensearch-learning-to-rank](https://github.com/aparo/opensearch-learning-to-rank).

Only 14 tests or above ~200 are not working due to securemock issues.

Any feedback is welcomed.

---

<div class="post-metadata">

### Author: ![searchymcsearchface](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/searchymcsearchface/32/868_2.png) [@searchymcsearchface](https://forum.opensearch.org/u/searchymcsearchface)
#### Post date: [August 24, 2021, 9:17pm UTC](https://forum.opensearch.org/t/opensearch-learning-to-rank-plugin/6847/2 "2021-08-24T21:17:23Z")

</div>

Wow. That was fast. Did you use the automated tool you spoke about in the meeting or was this done by hand?

---

<div class="post-metadata">

### Author: ![aparo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/aparo/32/224_2.png) [@aparo](https://forum.opensearch.org/u/aparo)
#### Post date: [August 25, 2021, 6:44am UTC](https://forum.opensearch.org/t/opensearch-learning-to-rank-plugin/6847/3 "2021-08-25T06:44:51Z")

</div>

The big part was done by the script to convert names and classes to opensearch namespaces. It’s not perfect but it does the majority of the change.  
Elasticsearch code and opensearch code are quite the same.  
To compile the code, I had to remove some references to old Elasticsearch version (7.7, 6.7, …).  
And then after the testing, it’s quite fast to do a github release 😉

---

<div class="post-metadata">

### Author: ![anshuk](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@anshuk](https://forum.opensearch.org/u/anshuk)
#### Post date: [August 17, 2022, 5:40pm UTC](https://forum.opensearch.org/t/opensearch-learning-to-rank-plugin/6847/4 "2022-08-17T17:40:58Z")

</div>

hi, we are currently evaluating open-search and the ltr plugin (using the fork for the same) Installed open-search and the ltr plugin. Now trying write the code which would use the ltr apis to search (not normal search, that I have already done), but using ltr based search. Has any one tried some thing on these lines (hello-ltr uses elastic search sever), want to use the same for opensearch server

---

<div class="post-metadata">

### Author: ![dtaivpp](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/dtaivpp/32/2814_2.png) [@dtaivpp](https://forum.opensearch.org/u/dtaivpp)
#### Post date: [January 6, 2023, 9:56pm UTC](https://forum.opensearch.org/t/opensearch-learning-to-rank-plugin/6847/5 "2023-01-06T21:56:08Z")

</div>

Hey @anshuk check out Grant Ingersoll’s repo for some good examples.

> **[opensearch-learning-to-rank-base/sample\_models at main ·...](https://github.com/gsingers/opensearch-learning-to-rank-base/tree/main/sample_models)**
>
> main/sample\_models

---

<div class="post-metadata">

### Author: ![markcohen](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@markcohen](https://forum.opensearch.org/u/markcohen)
#### Post date: [June 13, 2023, 1:01pm UTC](https://forum.opensearch.org/t/opensearch-learning-to-rank-plugin/6847/6 "2023-06-13T13:01:27Z")

</div>

Also, take a look at [OpenSearch - Hello LTR Update by macohen · Pull Request #91 · o19s/hello-ltr · GitHub](https://github.com/o19s/hello-ltr/pull/91); it’s nowhere near complete, but uses Grant’s plugin. We have a propsal to move that repo into the opensearch-project as well. [[PROPOSAL] Make the Opensearch LTR Plugin a part of the OpenSearch official plugin ecosystem · Issue #217 · opensearch-project/opensearch-plugins · GitHub](https://github.com/opensearch-project/opensearch-plugins/issues/217).
