如何使用 JSON 请求 API 发送 Solr 空间查询
How to send a Solr spatial query using JSON request API
在 Apache Solr 中查询空间位置字段的等效 JSON 请求是什么:
&fq={!bbox sfield=locfield}&pt=45.15,-93.85&d=5
您可以使用 params
块。
Parameters placed in a params
block act as if they were added verbatim
to the query-parameters of the request.
例如使用 curl :
curl "http://hostname:8983/solr/corename/query?" -d '
{
params: {
q: "*:*",
fq: "{!bbox sfield=locfield}",
pt: "45.15,-93.85",
d: "5"
}
}'
在 Apache Solr 中查询空间位置字段的等效 JSON 请求是什么:
&fq={!bbox sfield=locfield}&pt=45.15,-93.85&d=5
您可以使用 params
块。
Parameters placed in a
params
block act as if they were added verbatim to the query-parameters of the request.
例如使用 curl :
curl "http://hostname:8983/solr/corename/query?" -d '
{
params: {
q: "*:*",
fq: "{!bbox sfield=locfield}",
pt: "45.15,-93.85",
d: "5"
}
}'