question: NamedList < SolrDocumentList > buildMoreLikeThisNamed ( Map < Object , SolrDocumentList > allMlt , Map < Object , ShardDoc > resultIds ) { NamedList < SolrDocumentList > result = new NamedList < > ( ) ; TreeMap < Integer , Object > sortingMap = new TreeMap < > ( ) ; for ( Entry < Object , ShardDoc > next : resultIds . entrySet ( ) ) { sortingMap . put ( next . getValue ( ) . positionInResponse , next . getKey ( ) ) ; } for ( Object key : sortingMap . values ( ) ) { SolrDocumentList sdl = allMlt . get ( key ) ; if ( sdl == null ) { sdl = new SolrDocumentList ( ) ; sdl . setNumFound ( 0 ) ; sdl . setStart ( 0 ) ; } result . add ( key . toString ( ) , sdl ) ; } return result ; }
target:  Returns NamedList based on the order of resultIds.shardDoc.positionInResponse