private SimpleOrderedMap < Object > createPosition ( ComponentPosition position , Boolean encode ) throws IOException { // System.out.println("Create stats position " + position.dataType + " " // + position.statsType + " " + position.statsItems + " --- " + encode); SimpleOrderedMap < Object > mtasPositionResponse = new SimpleOrderedMap <> ( ) ; mtasPositionResponse . add ( "key" , position . key ) ; MtasSolrMtasResult data = new MtasSolrMtasResult ( position . dataCollector , position . dataType , position . statsType , position . statsItems , null , null ) ; if ( encode ) { mtasPositionResponse . add ( "_encoded_data" , MtasSolrResultUtil . encode ( data ) ) ; } else { mtasPositionResponse . add ( position . dataCollector . getCollectorType ( ) , data ) ; MtasSolrResultUtil . rewrite ( mtasPositionResponse , searchComponent ) ; } return mtasPositionResponse ; }
Creates the position .