<commit_before>package com.browseengine.bobo.api;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import org.apache.log4j.Logger;
import org.apache.lucene.index.AtomicReaderContext;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.MultiReader;
import org.apache.lucene.search.Collector;
import org.apache.lucene.search.Explanation;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.MatchAllDocsQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.SortField;
import org.apache.lucene.search.Weight;

import com.browseengine.bobo.facets.FacetHandler;
import com.browseengine.bobo.sort.SortCollector;

/**
 * Provides implementation of Browser for multiple Browser instances
 */
public class MultiBoboBrowser extends MultiReader implements Browsable {
  private static Logger logger = Logger.getLogger(MultiBoboBrowser.class);

  private IndexSearcher _indexSearcher = null;
  protected Browsable[] _subBrowsers;

  public MultiBoboBrowser(BoboMultiReader reader) throws IOException {
    super(reader._subReaders.toArray(new BoboSegmentReader[0]));
    _indexSearcher = new IndexSearcher(this);
    initSubBrowsers();
  }

  /**
   *
   * @param browsers
   *          Browsers to search on
   * @throws IOException
   */
  public MultiBoboBrowser(Browsable[] browsers) throws IOException {
    super(getSubReaders(browsers), false);
    _indexSearcher = new IndexSearcher(this);
    initSubBrowsers();<commit_msg>Add MultiBoboBrowser interface for sensei<commit_after>package com.browseengine.bobo.api;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import org.apache.log4j.Logger;
import org.apache.lucene.index.AtomicReaderContext;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.MultiReader;
import org.apache.lucene.search.Collector;
import org.apache.lucene.search.Explanation;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.MatchAllDocsQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.SortField;
import org.apache.lucene.search.Weight;

import com.browseengine.bobo.facets.FacetHandler;
import com.browseengine.bobo.sort.SortCollector;

/**
 * Provides implementation of Browser for multiple Browser instances
 */
public class MultiBoboBrowser extends MultiReader implements Browsable {
  private static Logger logger = Logger.getLogger(MultiBoboBrowser.class);

  private IndexSearcher _indexSearcher = null;
  protected Browsable[] _subBrowsers;

  public MultiBoboBrowser(BoboMultiReader reader) throws IOException {
    this(reader._subReaders);
  }

  public MultiBoboBrowser(List<BoboSegmentReader> segmentReaders) throws IOException {
    super(segmentReaders.toArray(new BoboSegmentReader[0]), false);
    _indexSearcher = new IndexSearcher(this);
    initSubBrowsers();
  }

  /**
   *
   * @param browsers
   *          Browsers to search on
   * @throws IOException
   */
  public MultiBoboBrowser(Browsable[] browsers) throws IOException {
    super(getSubReaders(browsers), false);
    _indexSearcher = new IndexSearcher(this);
    initSubBrowsers();
{'fraction_non_alphanumeric': 0.09746366486178398, 'fraction_numerical': 0.001139925904816187, 'mean_word_length': 5.212389380530974, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3752701', 'n_tokens_mistral': 1132, 'n_tokens_neox': 1087, 'n_words': 216}