Package org.springframework.data.solr.core.query

Examples of org.springframework.data.solr.core.query.SimplePivotField


      return Collections.emptyList();
    }
    List<PivotField> fields = new ArrayList<PivotField>(this.facetPivotResultPages.size());

    for (PageKey pageKey : this.facetPivotResultPages.keySet()) {
      fields.add(new SimplePivotField(pageKey.getKey().toString()));
    }

    return fields;
  }
View Full Code Here


    NamedList<List<PivotField>> facetPivot = response.getFacetPivot();
    if (facetPivot != null && facetPivot.size() > 0) {
      for (int i = 0; i < facetPivot.size(); i++) {
        String name = facetPivot.getName(i);
        List<PivotField> pivotResult = facetPivot.get(name);
        facetResult.put(new SimplePivotField(name), convertPivotResult(pivotResult));
      }
    }

    return facetResult;
  }
View Full Code Here

    Mockito.when(response.getFacetPivot()).thenReturn(pivotData);

    Map<PivotField, List<FacetPivotFieldEntry>> result = ResultHelper.convertFacetQueryResponseToFacetPivotMap(
        createFacetPivotQuery("field_1", "field_2"), response);

    List<FacetPivotFieldEntry> resultPivot = result.get(new SimplePivotField("field_1", "field_2"));
    Assert.assertNotNull(result);
    Assert.assertEquals(2, resultPivot.size());

    Assert.assertNotNull(resultPivot.get(0));
    Assert.assertEquals("value_1", resultPivot.get(0).getValue());
View Full Code Here

TOP

Related Classes of org.springframework.data.solr.core.query.SimplePivotField

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.