13011302130313041305130613071308130913101311
reader.close(); } }; helper.start(); } protected TokenStream getTS2() { // String s = "Hi-Speed10 foo";
14711472147314741475147614771478147914801481
result = highlighter.getBestFragments(getTS2a(), s, 3, "..."); assertEquals("<B>Hi-Speed</B>10 foo", result); } }; helper.start(); } private Directory dir = new RAMDirectory(); private Analyzer a = new WhitespaceAnalyzer();
851852853854855856857858859860861
assertTrue("Failed to find correct number of highlights " + numHighlights + " found", numHighlights == 5); } }; helper.start(); } public void testGetRangeFragments() throws Exception { TestHighlightRunner helper = new TestHighlightRunner() {
881882883884885886887888889890891
assertTrue("Failed to find correct number of highlights " + numHighlights + " found", numHighlights == 5); } }; helper.start(); } public void testConstantScoreMultiTermQuery() throws Exception { numHighlights = 0;
981982983984985986987988989990991
assertTrue("Failed to find correct number of highlights " + numHighlights + " found", numHighlights == 2); } }; helper.start(); } public void testGetBestFragmentsQueryScorer() throws Exception { TestHighlightRunner helper = new TestHighlightRunner() {
10021003100410051006100710081009101010111012
assertTrue("Failed to find correct number of highlights " + numHighlights + " found", numHighlights == 2); } }; helper.start(); } public void testOffByOne() throws Exception { TestHighlightRunner helper = new TestHighlightRunner() {
10201021102210231024102510261027102810291030
assertEquals("<B>help</B> me [54-65]", match); } }; helper.start(); } public void testGetBestFragmentsFilteredQuery() throws Exception { TestHighlightRunner helper = new TestHighlightRunner() {
10431044104510461047104810491050105110521053
assertTrue("Failed to find correct number of highlights " + numHighlights + " found", numHighlights == 2); } }; helper.start(); } public void testGetBestFragmentsFilteredPhraseQuery() throws Exception { TestHighlightRunner helper = new TestHighlightRunner() {
10661067106810691070107110721073107410751076
assertTrue("Failed to find correct number of highlights " + numHighlights + " found", numHighlights == 2); } }; helper.start(); } public void testGetBestFragmentsMultiTerm() throws Exception { TestHighlightRunner helper = new TestHighlightRunner() {
10881089109010911092109310941095109610971098
assertTrue("Failed to find correct number of highlights " + numHighlights + " found", numHighlights == 5); } }; helper.start(); } public void testGetBestFragmentsWithOr() throws Exception { TestHighlightRunner helper = new TestHighlightRunner() {