Skip to content

Apache Lucene open-source search software

Fix off-by-one error in SimpleSortedSetFacetsExample (#12818)

Stefan Vodita9de0936a7fbc
diff --git a/lucene/demo/src/java/org/apache/lucene/demo/facet/SimpleSortedSetFacetsExample.java b/lucene/demo/src/java/org/apache/lucene/demo/facet/SimpleSortedSetFacetsExample.java
index 32b7545b311..9498676219d 100644
--- a/lucene/demo/src/java/org/apache/lucene/demo/facet/SimpleSortedSetFacetsExample.java
+++ b/lucene/demo/src/java/org/apache/lucene/demo/facet/SimpleSortedSetFacetsExample.java
@@ -150,7 +150,7 @@ public class SimpleSortedSetFacetsExample {
SimpleSortedSetFacetsExample example = new SimpleSortedSetFacetsExample();
List<FacetResult> results = example.runSearch();
System.out.println("Author: " + results.get(0));
- System.out.println("Publish Year: " + results.get(0));
+ System.out.println("Publish Year: " + results.get(1));
System.out.println("\n");
System.out.println("Facet drill-down example (Publish Year/2010):");