question: public static Map < String , DocumentPartitioner > removeDocumentPartitioners ( Document document ) { Map < String , DocumentPartitioner > partitioners = new HashMap < String , DocumentPartitioner > ( ) ; String [ ] partitionings = document . getPartitionings ( ) ; for ( int i = 0 ; i < partitionings . length ; i ++ ) { DocumentPartitioner partitioner = document . getDocumentPartitioner ( partitionings [ i ] ) ; if ( partitioner != null ) { document . setDocumentPartitioner ( partitionings [ i ] , null ) ; partitioner . disconnect ( ) ; partitioners . put ( partitionings [ i ] , partitioner ) ; } } return partitioners ; }
target:  Removes all connected document partitioners from the given document and stores them under their partitioning name in a map. This map is returned. After this method has been called the given document is no longer connected to any document partitioner.