Package org.apache.lucene.facet

Examples of org.apache.lucene.facet.FacetResult


public class TestDistanceFacetsExample extends LuceneTestCase {

  public void testSimple() throws Exception {
    DistanceFacetsExample example = new DistanceFacetsExample();
    example.index();
    FacetResult result = example.search();
    assertEquals("dim=field path=[] value=3 childCount=4\n  < 1 km (1)\n  < 2 km (2)\n  < 5 km (2)\n  < 10 km (3)\n", result.toString());
    example.close();
  }
View Full Code Here


@SuppressCodecs("Lucene3x")
public class TestExpressionAggregationFacetsExample extends LuceneTestCase {

  @Test
  public void testSimple() throws Exception {
    FacetResult result = new ExpressionAggregationFacetsExample().runSearch();
    assertEquals("dim=A path=[] value=3.9681187 childCount=2\n  B (2.236068)\n  C (1.7320508)\n", result.toString());
  }
View Full Code Here

  @Test
  public void testSimple() throws Exception {
    RangeFacetsExample example = new RangeFacetsExample();
    example.index();
    FacetResult result = example.search();
    assertEquals("dim=timestamp path=[] value=87 childCount=3\n  Past hour (4)\n  Past six hours (22)\n  Past day (87)\n", result.toString());
    example.close();
  }
View Full Code Here

TOP

Related Classes of org.apache.lucene.facet.FacetResult

Copyright © 2018 www.massapicom. 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.