Here only the sub query is added. The filters and score functions must be added separately with add() and a ScoreFunctionBuilder can already be added without a filter, see below. Or maybe I don't understand?