Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-16142

Spatial search in Query UI generates incorrect parameters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 9.0, 8.9, 8.11.1
    • 9.1, main (10.0)
    • spatial
    • None

    Description

      When using the tech_products example and checking the "Spatial" 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:

       

       

      {
        "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}} 

       

       

      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.

      Attachments

        Issue Links

          Activity

            People

              cpoerschke Christine Poerschke
              arsaljalib Arsal Jalib
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m