From d214dd8cd18399cb249c442e3bde7408cae74680 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Thu, 6 Apr 2006 17:25:02 +0000 Subject: [PATCH] LUCENE-512: Fixed ClassCastException in ParallelReader.getTermFreqVectors git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@392017 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 ++ src/java/org/apache/lucene/index/ParallelReader.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 4c45a31b11f..7eb21da74fc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -44,6 +44,8 @@ Bug fixes 9. LUCENE-514: Added getTermArrays() and extractTerms() to MultiPhraseQuery (Eric Jain & Yonik Seeley) +10. LUCENE-512: Fixed ClassCastException in ParallelReader.getTermFreqVectors + (frederic via Yonik) 1.9.1 diff --git a/src/java/org/apache/lucene/index/ParallelReader.java b/src/java/org/apache/lucene/index/ParallelReader.java index 00371446a69..26158de6a03 100644 --- a/src/java/org/apache/lucene/index/ParallelReader.java +++ b/src/java/org/apache/lucene/index/ParallelReader.java @@ -150,8 +150,8 @@ public class ParallelReader extends IndexReader { Iterator i = fieldToReader.entrySet().iterator(); while (i.hasNext()) { Map.Entry e = (Map.Entry)i.next(); - IndexReader reader = (IndexReader)e.getKey(); - String field = (String)e.getValue(); + String field = (String)e.getKey(); + IndexReader reader = (IndexReader)e.getValue(); TermFreqVector vector = reader.getTermFreqVector(n, field); if (vector != null) results.add(vector);