public static void recursive(String path, IndexFile indexFile)
			throws IOException, SAXException, SolrServerException {
		File root = new File(path);
		File[] list = root.listFiles();
		if (list == null)
			return;

		for (File f : list) {
			if (f.isDirectory()) {
				recursive(f.getAbsolutePath(), indexFile);
				System.out.println("Dir:" + f.getAbsoluteFile());
			} else {

				try {
					System.out.println("=================================================");
					System.out.println("File:" + f.getAbsoluteFile());
					InputStream input = new FileInputStream(f);
					Metadata metadata = new Metadata();
					BodyContentHandler handler = new BodyContentHandler(
							100 * 1024 * 1024);
					AutoDetectParser parser = new AutoDetectParser();
					parser.parse(input, handler, metadata);
					indexFile.indexMetadata(metadata, f);
				} catch (FileNotFoundException e1) {
					// TODO Auto-generated catch block
					e1.printStackTrace();
				} catch (Exception e) {
					e.printStackTrace();
				}
			}

		}
	}