summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-02-04 22:03:32 +0100
committerAndreas Baumann <abaumann@yahoo.com>2012-02-04 22:03:32 +0100
commitf5b881b920ae9ed2c31165650f703159752fc559 (patch)
tree68f5d01482a1bc7660c20435199467cd9439d3f2
parente6cb2dd799bdade4c29ab36f5527bb5540b2f073 (diff)
downloadLuceneAnalyzer-f5b881b920ae9ed2c31165650f703159752fc559.tar.gz
LuceneAnalyzer-f5b881b920ae9ed2c31165650f703159752fc559.tar.bz2
fixed printing of positions in -f -vv
-rw-r--r--src/main/java/org/dyndns/andreasbaumann/LuceneAnalyzer.java7
1 files 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, <abaumann@yahoo.com>
* @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( );