Arsal Jalib created SOLR-16142:
----------------------------------
Summary: Spacial search in Query UI generates incorrect parameters
Key: SOLR-16142
URL: https://issues.apache.org/jira/browse/SOLR-16142
Project: Solr
Issue Type: Bug
Security Level: Public (Default Security Level. Issues are Public)
Components: spatial
Affects Versions: 8.11.1
Reporter: Arsal Jalib
When using the tech_products example and checking the "Spacial" checkbox as
true, entering pt as 37.7752,-122.4232, d as 20, sfield as store and setting fq
as \{!geofilt} generates the following query:
*http://localhost:8983/solr/#/tech_products/query?q=*:*&q.op=OR&indent=true&spatial=true&fl=*,geodist(store,37.7752,-122.4232)&debugQuery=false&spatial.pt=37.7752,-122.4232&spatial.sfield=store&spatial.d=20&fq=%7B!geofilt%7D*
Which returns the following error on execution:
{code:java}
{
"responseHeader":{
"status":400,
"QTime":0,
"params":{
"q":"*:*",
"indent":"true",
"spatial.pt":"37.7752,-122.4232",
"q.op":"OR",
"fq":"{!geofilt}",
"spatial":"true",
"spatial.sfield":"store",
"_":"1649169714252",
"spatial.d":"20"}},
"error":{
"metadata":[
"error-class","org.apache.solr.common.SolrException",
"root-error-class","org.apache.solr.common.SolrException"],
"msg":" missing sfield for spatial request",
"code":400}} {code}
However if you update the query parameters like so
[http://localhost:8983/solr/#/tech_products/query?q=*:*&q.op=OR&indent=true&spatial=true&fl=*,geodist(store,37.7752,-122.4232)&debugQuery=false&pt=37.7752,-122.4232&sfield=store&d=20&fq=%7B!geofilt%7D]
It works fine. Looks like the query params generated using the UI are not
correct.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]