From f5b881b920ae9ed2c31165650f703159752fc559 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 4 Feb 2012 22:03:32 +0100 Subject: fixed printing of positions in -f -vv --- src/main/java/org/dyndns/andreasbaumann/LuceneAnalyzer.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/dyndns/andreasbaumann/LuceneAnalyzer.java b/src/main/java/org/dyndns/andreasbaumann/LuceneAnalyzer.java index 40e325a..4e696ff 100644 --- a/src/main/java/org/dyndns/andreasbaumann/LuceneAnalyzer.java +++ b/src/main/java/org/dyndns/andreasbaumann/LuceneAnalyzer.java @@ -48,8 +48,7 @@ import org.apache.lucene.document.Field; * for indexes fully in RAM or in different persistence systems as * a JDBCDirectory. * - * Note: requires at least lucene version 1.9.1, runs with versions - * up to version 2.9.4, but not with 3.x! + * Note: requires at least lucene 3.0! * * @author Andreas Baumann, * @version $Id$ @@ -171,7 +170,7 @@ public class LuceneAnalyzer System.out.print( "[" ); } System.out.print( position ); - if( i > 0 && i < termPositions.freq( ) - 1 ) { + if( i < termPositions.freq( ) - 1 ) { System.out.print( "," ); } if( i == termPositions.freq( ) - 1 ) { @@ -289,7 +288,7 @@ public class LuceneAnalyzer printFieldInfo( indexReader ); } if( (Boolean)parser.getOptionValue( terms, Boolean.FALSE ) ) { - printTerms( indexReader, verbosity == 1, verbosity == 2 ); + printTerms( indexReader, verbosity == 1, verbosity >= 2 ); } indexReader.close( ); -- cgit v1.2.3-54-g00ecf