0
我想通過使用它們的位置在solr中的圓圈中找到一些對象。這是我想要的查詢http://localhost:8983/solr/col/select?q=%3A&wt=json&indent=true&pt=10.34,12.4&d=5&sfield=location&fq= {!geofilt}Spring Solr地理空間搜索
但我無法爲此創建java代碼。我試過這樣
SimpleQuery query = new SimpleQuery();
query.addCriteria(Criteria.where("location").near(new Point(10.34, 12.4), new Distance(5)));
SolrDocumentList docs = null;
try {
QueryResponse rsp = server.query(query);
docs = rsp.getResults();
} catch (SolrServerException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
但是QueryResponse類不允許這樣做。我能做些什麼纔能有人幫助我?