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

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


    solrTemplate.saveBeans(Arrays.asList(bean1, bean2));
    solrTemplate.commit();

    Query q = new SimpleQuery("*:*");
    q.addProjectionOnField(new DistanceField("distance", "store", new Point(45.15, -93.85)));
    Page<ExampleSolrBean> result = solrTemplate.queryForPage(q, ExampleSolrBean.class);
    for (ExampleSolrBean bean : result) {
      Assert.assertThat(bean.getDistance(), IsNull.notNullValue());
    }

View Full Code Here

TOP

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

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.