Examples of TermStringList


Examples of com.browseengine.bobo.facets.data.TermStringList

  public FacetDataCache load(BoboIndexReader reader) throws IOException {
    int maxDoc = reader.maxDoc();

    BigIntArray order = new BigIntArray(maxDoc);

    TermValueList mterms = _termListFactory == null ? new TermStringList() : _termListFactory.createTermList();
   
    IntArrayList minIDList=new IntArrayList();
      IntArrayList maxIDList=new IntArrayList();
      IntArrayList freqList = new IntArrayList();
     
View Full Code Here

Examples of com.browseengine.bobo.facets.data.TermStringList

    org.apache.log4j.PropertyConfigurator.configure(confdir+"/log4j.properties");
  }
 
  public void testTermStringListAddWrongOrder()
  {
    TermStringList tsl1 = new TermStringList();
    tsl1.add(null);
    tsl1.add("m");
    try
    {
      tsl1.add("a");
    } catch(Exception e)
    {
      assertTrue("There should be an exception and the message contains ascending order", e.getMessage().contains("ascending order"));
      return;
    }
View Full Code Here

Examples of com.browseengine.bobo.facets.data.TermStringList

    fail("There should be an exception and the message contains ascending order");
  }

  public void testTermStringListAddCorrectOrder()
  {
    TermStringList tsl1 = new TermStringList();
    tsl1.add(null);
    tsl1.add("");
    try
    {
      tsl1.add("m");
      tsl1.add("s");
      tsl1.add("t");
    } catch(Exception e)
    {
      fail("There should NOT be an exception and the message contains ascending order");
      return;
    }
    tsl1.seal();
    assertEquals("Should skip index 0 which is used for dummy null", 1, tsl1.indexOf(""));
  }
View Full Code Here

Examples of com.browseengine.bobo.facets.data.TermStringList

    assertEquals("Should skip index 0 which is used for dummy null", 1, tsl1.indexOf(0));
  }
 
  public void testDefaultFaccetIterator()
  {
    TermStringList tsl1 = new TermStringList();
    tsl1.add("i");
    tsl1.add("m");
    tsl1.seal();
    DefaultFacetIterator itr1 = new DefaultFacetIterator(tsl1, new int[] { 1, 2 }, 2, false);
    TermStringList tsl2 = new TermStringList();
    tsl2.add("i");
    tsl2.add("m");
    tsl2.seal();
    DefaultFacetIterator itr2 = new DefaultFacetIterator(tsl2, new int[] { 1, 5 }, 2, true);
    List<FacetIterator> list = new ArrayList<FacetIterator>();
    list.add(itr1);
    list.add(itr2);
    CombinedFacetIterator ctr = new CombinedFacetIterator(list);
View Full Code Here

Examples of com.browseengine.bobo.facets.data.TermStringList

  public BoboFacetIteratorTest(String testName) {
    super(testName);
  }

  public void testTermStringListAddWrongOrder() {
    TermStringList tsl1 = new TermStringList();
    tsl1.add(null);
    tsl1.add("m");
    try {
      tsl1.add("a");
    } catch (Exception e) {
      assertTrue("There should be an exception and the message contains ascending order", e
          .getMessage().contains("ascending order"));
      return;
    }
View Full Code Here

Examples of com.browseengine.bobo.facets.data.TermStringList

    }
    fail("There should be an exception and the message contains ascending order");
  }

  public void testTermStringListAddCorrectOrder() {
    TermStringList tsl1 = new TermStringList();
    tsl1.add(null);
    tsl1.add("");
    try {
      tsl1.add("m");
      tsl1.add("s");
      tsl1.add("t");
    } catch (Exception e) {
      fail("There should NOT be an exception and the message contains ascending order");
      return;
    }
    tsl1.seal();
    assertEquals("Should skip index 0 which is used for dummy null", 1, tsl1.indexOf(""));
  }
View Full Code Here

Examples of com.browseengine.bobo.facets.data.TermStringList

    tsl1.seal();
    assertEquals("Should skip index 0 which is used for dummy null", 1, tsl1.indexOf(0));
  }

  public void testDefaultFaccetIterator() {
    TermStringList tsl1 = new TermStringList();
    tsl1.add("i");
    tsl1.add("m");
    tsl1.seal();
    BigIntArray count = new BigIntArray(2);
    count.add(0, 1);
    count.add(1, 2);
    DefaultFacetIterator itr1 = new DefaultFacetIterator(tsl1, count, 2, false);
    TermStringList tsl2 = new TermStringList();
    tsl2.add("i");
    tsl2.add("m");
    tsl2.seal();
    BigIntArray count2 = new BigIntArray(2);
    count2.add(0, 1);
    count2.add(1, 5);
    DefaultFacetIterator itr2 = new DefaultFacetIterator(tsl2, count2, 2, true);
    List<FacetIterator> list = new ArrayList<FacetIterator>();
View Full Code Here

Examples of com.browseengine.bobo.facets.data.TermStringList

    int maxDoc = reader.maxDoc();
    int size = dataMap == null ? 1:(dataMap.size() + 1);

    BigSegmentedArray order = new BigIntArray(maxDoc);
    TermValueList list = _termListFactory == null ?
      new TermStringList(size) :
      _termListFactory.createTermList(size);

    int[] freqs = new int[size];
    int[] minIDs = new int[size];
    int[] maxIDs = new int[size];
View Full Code Here

Examples of com.browseengine.bobo.facets.data.TermStringList

  public FacetDataCache load(BoboIndexReader reader) throws IOException {
    int maxDoc = reader.maxDoc();

    BigIntArray order = new BigIntArray(maxDoc);

    TermValueList mterms = _termListFactory == null ? new TermStringList() : _termListFactory.createTermList();
   
    IntArrayList minIDList=new IntArrayList();
      IntArrayList maxIDList=new IntArrayList();
      IntArrayList freqList = new IntArrayList();
     
View Full Code Here

Examples of com.browseengine.bobo.facets.data.TermStringList

    _numdocs = numdocs;
   
    _predefinedBuckets = predefinedBuckets;
    _collapsedCounts = null;
   
    _bucketValues = new TermStringList();
    _bucketValues.add("");
   
    String[] bucketArray = _predefinedBuckets.keySet().toArray(new String[0]);
    Arrays.sort(bucketArray);
    for (String bucket : bucketArray){
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.