hasValue and seen seem t..
Ok. Thanks. I've collapsed them.
I did is non backward compatible due to child Query. But turning child Query to DISI turned out soo hard. I had to reproduce ValueSource.ValueSourceSortField trick with weight and context map. But now ToParentBlockJoinSortField should be rewriten before searching. I find it not really convenient, but looks like it's what ValueSourceSortField users live with, see SolrIndexSearcher.weightSort(Sort) (I know), and TestFunctionQuerySort as well. I wonder if we can do this simpler?
Finally I'm still not a fan of the
Thankfully it doesn't sound like veto. Does it? I renamed it to the package level ToParentDocValues and pack both twins (sorted and numerics) into it. So, we can think that internally this code is duplicated.
I propose this OO-hairish stuff because the current duplicated code introduced the bug, and I'm afraid it's caused exactly by this duplication.