I found a workaround using rescore. It's not ideal, but with a large enough
window, it should yield good results. Here's your query again, rewritten
with a rescore.

GET index/document/_search
{
  "query": {
    "match": {
      "title": "basketball"
    }
  },
  "rescore": {
    "window_size": 100,
    "query": {
      "score_mode": "multiply",
      "rescore_query": {
        "has_child": {
          "type": "document_boost",
          "query": {
            "function_score": {
              "script_score": {
                "script": "doc['document_boost.popular_boost_recent'].value"
              }
            }
          }
        }
      }
    }
  }
}



--
View this message in context: 
http://elasticsearch-users.115913.n3.nabble.com/Impossible-to-implement-real-custom-boost-query-when-the-weight-is-in-the-child-document-tp4057206p4059644.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/1405051569505-4059644.post%40n3.nabble.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to