The first thing to post is a demo of Hellotikaindex.java using Tika to create an index.
PS: About the introduction and usage of Tika, as detailed in the Hellotika.java below
Package com.jadyer.lucene;
Import Java.io.File;
Import java.io.IOException;
Import org.apache.lucene.document.Document;
Import Org.apache.lucene.document.Field;
Import Org.apache.lucene.index.IndexReader;
Import Org.apache.lucene.index.IndexWriter;
Import Org.apache.lucene.index.IndexWriterConfig;
Import Org.apache.lucene.index.Term;
Import Org.apache.lucene.search.IndexSearcher;
Import Org.apache.lucene.search.Query;
Import Org.apache.lucene.search.ScoreDoc;
Import Org.apache.lucene.search.TermQuery;
Import Org.apache.lucene.search.TopDocs;
Import Org.apache.lucene.store.Directory;
Import Org.apache.lucene.store.FSDirectory;
Import org.apache.lucene.util.Version;
Import Org.apache.tika.Tika;
Import Com.chenlb.mmseg4j.analysis.ComplexAnalyzer;
/** * "Lucene3.6.2 Introductory series" 10th _tika * @create Aug, 2013 11:02:21 PM * @author Xuan Yu