ScoreOrderFragmentsBuilder fragmentsBuilder = new ScoreOrderFragmentsBuilder();
fragmentsBuilder.setDiscreteMultiValueHighlighting( true );
IndexReader reader = DirectoryReader.open(writer, true );
String[] preTags = new String[] { "<b>" };
String[] postTags = new String[] { "</b>" };
Encoder encoder = new DefaultEncoder();
int docId = 0;
BooleanQuery query = new BooleanQuery();
query.add( clause( "field", "hero" ), Occur.SHOULD);
query.add( clause( "field", "of" ), Occur.SHOULD);
query.add( clause( "field", "legend" ), Occur.SHOULD);