|
配置schema.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114 loupan_id
115 search_kw
116
117
在提交数据时的格式为:(纬度,经度:以字符串的方式提交给solr)
45.17614,-93.87341
40.7143,-74.006
37.7752,-122.4232
例如要查寻距离纬度经度(31.254982,121.47501)5km的所有满足条件的楼盘:
http://192.168.181.140:8487/solr/loupan/select/?q=city_id:11&fq={!geofilt pt=31.254982,121.47501 sfield=latlng d=5} 查找满足指定距离的结果集,并按照距离由近到远排序
http://192.168.181.140:8487/solr/loupan/select/?q=*:*&fq={!geofilt}&pt=31.2367,121.501&sfield=latlng&d=5&sort=geodist()+asc
参考:
http://wiki.apache.org/solr/SpatialSearchDev
http://wiki.apache.org/solr/SpatialSearch
|
|
|