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

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


  @Test
  public void testConvertFacetQueryResponseForQueryResultWithEmptyFacetQueries() {
    Mockito.when(response.getFacetQuery()).thenReturn(Collections.<String, Integer> emptyMap());
    List<FacetQueryEntry> result = ResultHelper.convertFacetQueryResponseToFacetQueryResult(
        createFacetQuery(new SimpleQuery(new SimpleStringCriteria("field_1:[* TO 5]"))), response);
    Assert.assertNotNull(result);
    Assert.assertTrue(result.isEmpty());
  }
View Full Code Here


    resultMap.put("field_1:[* TO 5]", 5);
    resultMap.put("field_1:[6 TO *]", 10);

    Mockito.when(response.getFacetQuery()).thenReturn(resultMap);
    List<FacetQueryEntry> result = ResultHelper.convertFacetQueryResponseToFacetQueryResult(
        createFacetQuery(new SimpleQuery(new SimpleStringCriteria("field_1:[* TO 5]")), new SimpleQuery(
            new SimpleStringCriteria("field_1:[6 TO *]"))), response);
    Assert.assertNotNull(result);
    Assert.assertEquals(2, result.size());

    Assert.assertEquals(5, result.get(0).getValueCount());
View Full Code Here

TOP

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

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.