protected void addDocs(String index,String type,int number) throws JsonProcessingException {
  ObjectMapper mapper=new ObjectMapper();
  for (int i=0; i < number; i++) {
    index(index,type,"doc_" + i,mapper.writeValueAsString(TestDocument.createSimpleDoc(i)));
  }
  flush();
}

protected void addDocs ( String index , String type , int number ) throws JsonProcessingException { ObjectMapper mapper = new ObjectMapper ( ) ; for ( int i = 0 ; i < number ; i ++ ) { index ( index , type , "doc_" + i , mapper . writeValueAsString ( TestDocument . createSimpleDoc ( i ) ) ) ; } flush ( ) ; }
adds the specified number of docs to the type within index
