List of usage examples for org.apache.lucene.facet FacetResult toString
@Override
public String toString()
From source file:org.apache.lucene.demo.facet.TestAssociationsFacetsExample.java
License:Apache License
@Test public void testDrillDown() throws Exception { FacetResult result = new AssociationsFacetsExample().runDrillDown(); assertEquals("dim=genre path=[] value=-1.0 childCount=2\n computing (0.75)\n software (0.34)\n", result.toString()); }
From source file:org.apache.lucene.demo.facet.TestDistanceFacetsExample.java
License:Apache License
public void testSimple() throws Exception { DistanceFacetsExample example = new DistanceFacetsExample(); example.index();//from w w w . jav a2 s .c o m 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(); }
From source file:org.apache.lucene.demo.facet.TestExpressionAggregationFacetsExample.java
License:Apache License
@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()); }
From source file:org.apache.lucene.demo.facet.TestRangeFacetsExample.java
License:Apache License
@Test public void testSimple() throws Exception { RangeFacetsExample example = new RangeFacetsExample(); example.index();// w w w. j a v a2 s .c o m 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(); }
From source file:org.apache.lucene.demo.facet.TestSimpleFacetsExample.java
License:Apache License
@Test public void testDrillDown() throws Exception { FacetResult result = new SimpleFacetsExample().runDrillDown(); assertEquals("dim=Author path=[] value=2 childCount=2\n Bob (1)\n Lisa (1)\n", result.toString()); }
From source file:org.apache.lucene.demo.facet.TestSimpleSortedSetFacetsExample.java
License:Apache License
@Test public void testDrillDown() throws Exception { FacetResult result = new SimpleSortedSetFacetsExample().runDrillDown(); assertEquals("dim=Author path=[] value=2 childCount=2\n Bob (1)\n Lisa (1)\n", result.toString()); }