title: How can I implement pairwise query-dependent learning-to-rank in Azure Search?
body: <strong>The problem:</strong>
  
  <p>I am setting up a product that utilizes Azure Search, and one of the requirements is that the results of a search conduct multi-stage learning-to-rank where the final stage involves a <em>pairwise query-dependent machine-learned model</em> such as RankNet.</p>
  
  <p>Is there any existing support in Azure Search for this? If not, where in the Azure Search pipeline would you recommend I start? </p>
  
  <strong>What I have tried:</strong>
  
  <p>I had been hoping to find something similar to the <a href="https://elasticsearch-learning-to-rank.readthedocs.io/en/latest/index.html" rel="nofollow noreferrer">ElasticSearch LTR Plugin</a> but have not been able to.</p>
  
  <p>The only option I can currently think of is to set-up a server which forwards the query from the front-end to Azure Search, re-ranks the search results my pairwise LTR methods, reconstructs the re-ranked search results, and sends those to the front-end.</p>
  
  <p>However, I am very apprehensive about the inefficiency of this option and it would be unnecessary if there is an existing way for me to do this.</p>
  
  <strong>Language / Libraries</strong>
  
  <p>If relevant: I am coding primarily in C# and would be using <a href="https://github.com/Microsoft/CNTK" rel="nofollow noreferrer">CNTK</a> for machine-learning.</p>