Index: contrib/highlighter/src/java/org/apache/lucene/search/highlight/QueryScorer.java
===================================================================
--- contrib/highlighter/src/java/org/apache/lucene/search/highlight/QueryScorer.java	(revision 808911)
+++ contrib/highlighter/src/java/org/apache/lucene/search/highlight/QueryScorer.java	(working copy)
@@ -23,6 +23,7 @@
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.lucene.analysis.CachingTokenFilter;
 import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute;
 import org.apache.lucene.analysis.tokenattributes.TermAttribute;
@@ -52,6 +53,7 @@
   private String field;
   private IndexReader reader;
   private boolean skipInitExtractor;
+  private boolean wrapToCaching = true;
 
   /**
    * @param query Query to use for highlighting
@@ -209,6 +211,7 @@
         : new WeightedSpanTermExtractor(defaultField);
 
     qse.setExpandMultiTermQuery(expandMultiTermQuery);
+    qse.setWrapIfNotCachingTokenFilter(wrapToCaching);
     if (reader == null) {
       this.fieldWeightedSpanTerms = qse.getWeightedSpanTerms(query,
           tokenStream, field);
@@ -249,4 +252,17 @@
   public void setExpandMultiTermQuery(boolean expandMultiTermQuery) {
     this.expandMultiTermQuery = expandMultiTermQuery;
   }
+  
+  /**
+   * By default, {@link TokenStream}s that are not of the type
+   * {@link CachingTokenFilter} are wrapped in a {@link CachingTokenFilter} to
+   * ensure an efficient reset - if you are already using a different caching
+   * {@link TokenStream} impl and you don't want it to be wrapped, set this to
+   * false.
+   * 
+   * @param wrap
+   */
+  public void setWrapIfNotCachingTokenFilter(boolean wrap) {
+    this.wrapToCaching = wrap;
+  }
 }
Index: contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java
===================================================================
--- contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java	(revision 808911)
+++ contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java	(working copy)
@@ -64,6 +64,7 @@
   private String defaultField;
   private boolean expandMultiTermQuery;
   private boolean cachedTokenStream;
+  private boolean wrapToCaching = true;
 
   public WeightedSpanTermExtractor() {
   }
@@ -303,7 +304,7 @@
   }
 
   private IndexReader getReaderForField(String field) throws IOException {
-    if(!cachedTokenStream && !(tokenStream instanceof CachingTokenFilter)) {
+    if(wrapToCaching && !cachedTokenStream && !(tokenStream instanceof CachingTokenFilter)) {
       tokenStream = new CachingTokenFilter(tokenStream);
       cachedTokenStream = true;
     }
@@ -488,4 +489,17 @@
   public TokenStream getTokenStream() {
     return tokenStream;
   }
+  
+  /**
+   * By default, {@link TokenStream}s that are not of the type
+   * {@link CachingTokenFilter} are wrapped in a {@link CachingTokenFilter} to
+   * ensure an efficient reset - if you are already using a different caching
+   * {@link TokenStream} impl and you don't want it to be wrapped, set this to
+   * false.
+   * 
+   * @param wrap
+   */
+  public void setWrapIfNotCachingTokenFilter(boolean wrap) {
+    this.wrapToCaching = wrap;
+  }
 }

