public static void main(String []args)throws Exception {
// 建立好索引啦
RAMDirectory directory = new RAMDirectory();
IndexWriter indexWriter = new IndexWriter(directory, new IndexWriterConfig(Version.LUCENE_34, new StandardAnalyzer(Version.LUCENE_34)));
Document doc = new Document();
doc.add(new Field("field"," the quick brown fox jumped over the lazy dog the",Field.Store.YES,Field.Index.ANALYZED));
doc.add(new Field("field"," a b c d e f",Field.Store.YES,Field.Index.ANALYZED)); indexWriter.addDocument(doc);
indexWriter.close();        //开始搜索
IndexSearcher indexSearcher = new IndexSearcher(directory);
PhraseQuery query = new PhraseQuery();
//query.setSlop(1);
query.add(new Term("field","a b"));

TopDocs topDocs = indexSearcher.search(query, 400);
System.out.println(topDocs.totalHits);
}
}    为什么搜索不了 a blucene搜索索引