From c67912e2592c5e877c1c7d430844d0c77f574cdb Mon Sep 17 00:00:00 2001 From: kimchy Date: Thu, 17 Feb 2011 19:25:23 +0200 Subject: [PATCH] reset stream when getting all stream so it can be reused --- .../main/java/org/elasticsearch/common/lucene/all/AllField.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/all/AllField.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/all/AllField.java index a8b3379d2c1..bd2311b84d2 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/all/AllField.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/all/AllField.java @@ -57,6 +57,7 @@ public class AllField extends AbstractField { @Override public TokenStream tokenStreamValue() { try { + allEntries.reset(); // reset the all entries, just in case it was read already return AllTokenStream.allTokenStream(name, allEntries, analyzer); } catch (IOException e) { throw new ElasticSearchException("Failed to create token stream");