Example usage for org.springframework.data.solr.core.query SimpleQuery SimpleQuery

List of usage examples for org.springframework.data.solr.core.query SimpleQuery SimpleQuery

Introduction

In this page you can find the example usage for org.springframework.data.solr.core.query SimpleQuery SimpleQuery.

Prototype

public SimpleQuery(String queryString, Pageable pageable) 

Source Link

Usage

From source file:org.springframework.data.solr.core.query.SimpleQueryTest.java

@Test
public void testCreateQueryWithSortedPageRequest() {
    SimpleQuery query = new SimpleQuery(new SimpleStringCriteria("*:*"),
            new PageRequest(0, 20, Sort.Direction.DESC, "value_1", "value_2"));
    Assert.assertNotNull(query.getPageRequest());
    Assert.assertNotNull(query.getSort());

    int i = 0;/* w w  w. j  a v a  2  s.  c om*/
    for (Order order : query.getSort()) {
        Assert.assertEquals(Sort.Direction.DESC, order.getDirection());
        Assert.assertEquals("value_" + (++i), order.getProperty());
    }

}