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

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


    solrTemplate.saveBean(new ExampleSolrBean("id_2", "name1", "category2"));
    solrTemplate.saveBean(new ExampleSolrBean("id_3", "name2", "category2", 1, true));
    solrTemplate.saveBean(new ExampleSolrBean("id_4", "name3", "category2"));
    solrTemplate.commit();

    Function f = IfFunction.when("inStock").then("1").otherwise("2");
    Query q1 = new SimpleQuery("cat:category2");
    Query q2 = new SimpleQuery("cat:category1");

    SimpleQuery groupQuery = new SimpleQuery(new SimpleStringCriteria("*:*"));
    GroupOptions groupOptions = new GroupOptions();
View Full Code Here


  @Test
  public void testGetGroupResultFunction() {
    @SuppressWarnings("unchecked")
    GroupResult<Object> gr = new SimpleGroupResult<Object>(1, null, "name", Mockito.mock(Page.class));

    Function func = Mockito.mock(Function.class);

    Map<Object, GroupResult<Object>> groupResultMap = new HashMap<Object, GroupResult<Object>>();
    groupResultMap.put(func, gr);

    SolrResultPage<Object> result = new SolrResultPage<Object>(Collections.emptyList());
View Full Code Here

TOP

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

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.