You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2017/11/29 04:59:00 UTC

[jira] [Updated] (SOLR-11601) geodist fails for some fields when field is in parenthesis instead of sfield param

     [ https://issues.apache.org/jira/browse/SOLR-11601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Smiley updated SOLR-11601:
--------------------------------
       Priority: Minor  (was: Blocker)
    Component/s: spatial
     Issue Type: Improvement  (was: Bug)
        Summary: geodist fails for some fields when field is in parenthesis instead of sfield param  (was: solr.LatLonPointSpatialField : sorting by geodist fails)

I edited this issue to be an "Improvement" of priority "minor", and adjusted the title.  We could improve the error message further to note that geodist() does not support most spatial fields when their names are listed in its arguments (requires {{sfield}} param instead).  Or perhaps improve {{GeoDistValueSourceParser}} to actually support this.  Unfortunately it's a bit tricky based on it's use of fp.parseValueSourceList() which will ask field references for their value sources, leading to an exception here.  Perhaps it could manually parse the first and insist the use of a spatial field be in this position.  But it'd be awkward to support it in the 3rd position which is possible with a couple older spatial fields.

note: you don't need to use "pt" if you'd rather keep the latitude,longitude order points within geodist().  It's up to you.

> geodist fails for some fields when field is in parenthesis instead of sfield param
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-11601
>                 URL: https://issues.apache.org/jira/browse/SOLR-11601
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: spatial
>    Affects Versions: 6.6
>            Reporter: Clemens Wyss
>            Priority: Minor
>
> Im switching my schemas from derprecated solr.LatLonType to solr.LatLonPointSpatialField.
> Now my sortquery (which used to work with solr.LatLonType):
> *sort=geodist(b4_location__geo_si,47.36667,8.55) asc*
> raises the error
> {color:red}*"sort param could not be parsed as a query, and is not a field that exists in the index: geodist(b4_location__geo_si,47.36667,8.55)"*{color}
> Invoking sort using syntax 
> {color:#14892c}sfield=b4_location__geo_si&pt=47.36667,8.55&sort=geodist() asc
> works as expected though...{color}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org