@@ -0,0 +1,2065 @@
+package org.apache.lucene.facet.simple;%0A%0A/*%0A * Licensed to the Apache Software Foundation (ASF) under one or more%0A * contributor license agreements.  See the NOTICE file distributed with%0A * this work for additional information regarding copyright ownership.%0A * The ASF licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport org.apache.lucene.index.AtomicReaderContext;%0Aimport org.apache.lucene.search.Collector;%0Aimport org.apache.lucene.search.Scorer.ChildScorer;%0Aimport org.apache.lucene.search.Scorer;%0A%0A/** Verifies in collect() that all child subScorers are on%0A *  the collected doc. */%0Aclass AssertingSubDocsAtOnceCollector extends Collector %7B%0A%0A  // TODO: allow wrapping another Collector%0A%0A  List%3CScorer%3E allScorers;%0A%0A  @Override%0A  public void setScorer(Scorer s) %7B%0A    // Gathers all scorers, including s and %22under%22:%0A    allScorers = new ArrayList%3CScorer%3E();%0A    allScorers.add(s);%0A    int upto = 0;%0A    while(upto %3C allScorers.size()) %7B%0A      s = allScorers.get(upto++);%0A      for (ChildScorer sub : s.getChildren()) %7B%0A        allScorers.add(sub.child);%0A      %7D%0A    %7D%0A  %7D%0A%0A  @Override%0A  public void collect(int docID) %7B%0A    for(Scorer s : allScorers) %7B%0A      if (docID != s.docID()) %7B%0A        throw new IllegalStateException(%22subScorer=%22 + s + %22 has docID=%22 + s.docID() + %22 != collected docID=%22 + docID);%0A      %7D%0A    %7D%0A  %7D%0A%0A  @Override%0A  public void setNextReader(AtomicReaderContext context) %7B%0A  %7D%0A%0A  @Override%0A  public boolean acceptsDocsOutOfOrder() %7B%0A    return false;%0A  %7D%0A%7D%0A

add missing file