ehatcher 2004/06/02 20:04:10 Modified: contributions/highlighter/src/java/org/apache/lucene/search/highlight Fragmenter.java QueryScorer.java Scorer.java contributions/highlighter/src/test/org/apache/lucene/search/highlight HighlighterTest.java Log: aesthetic/javadoc fixups Revision Changes Path 1.2 +1 -1 jakarta-lucene-sandbox/contributions/highlighter/src/java/org/apache/lucene/search/highlight/Fragmenter.java Index: Fragmenter.java =================================================================== RCS file: /home/cvs/jakarta-lucene-sandbox/contributions/highlighter/src/java/org/apache/lucene/search/highlight/Fragmenter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Fragmenter.java 9 Apr 2004 00:34:31 -0000 1.1 +++ Fragmenter.java 3 Jun 2004 03:04:10 -0000 1.2 @@ -33,7 +33,7 @@
/** * Test to see if this token from the stream should be held in a new TextFragment - * @param token + * @param nextToken * @return */ public boolean isNewFragment(Token nextToken); 1.2 +1 -1 jakarta-lucene-sandbox/contributions/highlighter/src/java/org/apache/lucene/search/highlight/QueryScorer.java Index: QueryScorer.java =================================================================== RCS file: /home/cvs/jakarta-lucene-sandbox/contributions/highlighter/src/java/org/apache/lucene/search/highlight/QueryScorer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- QueryScorer.java 9 Apr 2004 00:34:31 -0000 1.1 +++ QueryScorer.java 3 Jun 2004 03:04:10 -0000 1.2 @@ -83,7 +83,7 @@ //not a query term - return return 0; } - //found a query term - is it unique in this doc? + //found a query term - is it unique in this fragment? if(!uniqueTermsInFragment.contains(termText)) { totalScore+=queryTerm.getWeight(); 1.3 +1 -1 jakarta-lucene-sandbox/contributions/highlighter/src/java/org/apache/lucene/search/highlight/Scorer.java Index: Scorer.java =================================================================== RCS file: /home/cvs/jakarta-lucene-sandbox/contributions/highlighter/src/java/org/apache/lucene/search/highlight/Scorer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Scorer.java 9 May 2004 16:03:57 -0000 1.2 +++ Scorer.java 3 Jun 2004 03:04:10 -0000 1.3 @@ -32,7 +32,7 @@ /** * Called for each token in the current fragment * @param token The token to be scored - * @return a score which is passed to the TermHighlighter class to influence the mark-up of the text + * @return a score which is passed to the Highlighter class to influence the mark-up of the text * (this return value is NOT used to score the fragment) */ public float getTokenScore(Token token); 1.2 +2 -9 jakarta-lucene-sandbox/contributions/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java Index: HighlighterTest.java =================================================================== RCS file: /home/cvs/jakarta-lucene-sandbox/contributions/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HighlighterTest.java 21 Apr 2004 01:06:04 -0000 1.1 +++ HighlighterTest.java 3 Jun 2004 03:04:10 -0000 1.2 @@ -60,14 +60,6 @@ "John Kennedy has been shot", "This text has a typo in referring to Keneddy" }; - /** - * Constructor for HighlightExtractorTest. - * @param arg0 - */ - public HighlighterTest(String arg0) - { - super(arg0); - } public void testSimpleHighlighter() throws Exception { @@ -211,7 +203,8 @@ highlighter.setMaxDocBytesToAnalyze(30); TokenStream tokenStream=analyzer.tokenStream(FIELD_NAME,new StringReader(texts[0])); String result = highlighter.getBestFragment(tokenStream,texts[0]); - assertTrue("Setting MaxDocBytesToAnalyze should have prevented " + "us from finding matches for this record" + numHighlights + + assertTrue("Setting MaxDocBytesToAnalyze should have prevented " + + "us from finding matches for this record" + numHighlights + " found", numHighlights == 0); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]