@Test
public void fastVectorTest() throws IOException {

	//Directory dir = new RAMDirectory();
       //IndexWriter indexWriter = new IndexWriter(dir, new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER));

       //indexWriter.addDocument(doc().add(field("_id", "1")).add(field("content", "the big bad dog", Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS)).build());

       //IndexReader reader = IndexReader.open(indexWriter, true);
       //IndexSearcher searcher = new IndexSearcher(reader);
       //TopDocs topDocs = searcher.search(new TermQuery(new Term("_id", "1")), 1);

	SearchRequest searchRequest = new SearchRequest();
	searchRequest.setKeyword("입니다");
	searchRequest.setCollectionName("sample");
	searchRequest.setSearchField("title,dscr");
	//IndexWriterManager indexWriterManager = IndexWriterManager.getIndexWriterManager();
	//IndexWriter indexWriter = indexWriterManager.getIndexWriter("sample");
	//IndexReader indexReader = IndexReader.open(indexWriter, true);
	
	SearcherManager searcherManager = crescentSearcherManager.getSearcherManager("sample");
	IndexSearcher indexSearcher = searcherManager.acquire();
	
	IndexReader indexReader = indexSearcher.getIndexReader();
	
	TopDocs topDocs = indexSearcher.search(new TermQuery(new Term("dscr", "입니다")), 3);
	
	System.out.println("ddd : " + indexReader.document(0));
	System.out.println(topDocs.totalHits);
	FastVectorHighlighter highlighter = new FastVectorHighlighter();
	
	System.out.println("field query : " + highlighter.getFieldQuery(new TermQuery(new Term("dscr", "입니다"))));
	
	//System.out.println(topDocs.scoreDocs[0].doc);
	String fragment = highlighter.getBestFragment(highlighter.getFieldQuery(new TermQuery(new Term("dscr", "텍스트"))),
			indexReader, topDocs.scoreDocs[0].doc, "dscr", 30);
	
	System.out.println(fragment);
	
/        assertThat(topDocs.totalHits, equalTo(1));
/ 
/        FastVectorHighlighter highlighter = new FastVectorHighlighter();
/        String fragment = highlighter.getBestFragment(highlighter.getFieldQuery(new TermQuery(new Term("content", "bad"))),
/                reader, topDocs.scoreDocs[0].doc, "content", 30);
/        assertThat(fragment, notNullValue());
/        System.out.println(fragment);
	
}