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

David Smiley resolved SOLR-6784.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 5.0

> Problems with BBoxField
> -----------------------
>
>                 Key: SOLR-6784
>                 URL: https://issues.apache.org/jira/browse/SOLR-6784
>             Project: Solr
>          Issue Type: Bug
>          Components: spatial
>    Affects Versions: 4.10.2
>            Reporter: Thomas Seidl
>            Assignee: David Smiley
>             Fix For: 4.10.3, 5.0
>
>         Attachments: 
> SOLR-6784__Bugfix-_BBoxField_didn_t_support_score=none.patch
>
>
> SOLR-6183 introduced the new BBoxField type which allows the indexing of 
> geospatial areas. However, upon trying it out I found numerous problems.
> First off, as described already by me in [the solr-user mailing 
> list|https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201411.mbox/%3C5471C611.9030708%40gmx.net%3E]
>  and by David Smiley in SOLR-6781, indexing doesn't work with dynamic fields.
> However, the problems continue after that: when searching, for some reason it 
> seems the {{score}} local parameter is necessary for filters on BBoxField 
> fields to work. (Even for {{fq}} parameters, where a score makes of course no 
> sense at all.) Otherwise, you get an unhelpful exception like this one:
> java.lang.NullPointerException
>       at 
> org.apache.solr.schema.BBoxField.getValueSourceFromSpatialArgs(BBoxField.java:114)
>       at 
> org.apache.solr.schema.BBoxField.getValueSourceFromSpatialArgs(BBoxField.java:34)
>       at 
> org.apache.solr.schema.AbstractSpatialFieldType.getQueryFromSpatialArgs(AbstractSpatialFieldType.java:269)
>       at 
> org.apache.solr.schema.AbstractSpatialFieldType.createSpatialQuery(AbstractSpatialFieldType.java:223)
>       at 
> org.apache.solr.search.SpatialFilterQParser.parse(SpatialFilterQParser.java:82)
>       at org.apache.solr.search.QParser.getQuery(QParser.java:141)
>       at 
> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:194)
>       at 
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:197)
>       at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
>       at org.apache.solr.core.SolrCore.execute(SolrCore.java:1967)
>       at 
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:777)
>       at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)
>       at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
>       at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
>       at 
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
>       at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
>       at 
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
>       at 
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
>       at 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
>       at 
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
>       at 
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
>       at 
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
>       at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
>       at 
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
>       at 
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
>       at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>       at org.eclipse.jetty.server.Server.handle(Server.java:368)
>       at 
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
>       at 
> org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
>       at 
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
>       at 
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
>       at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
>       at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
>       at 
> org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
>       at 
> org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
>       at 
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>       at 
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>       at java.lang.Thread.run(Thread.java:745)
> This is true for both the {{!field}} and the {{!bbox}} query parser - even 
> though the latter doesn't even allow the {{score}} parameter normally. Using 
> the range syntax for filtering on BBoxField fields is not possible at all, as 
> far as I can see, since there is no way to pass a {{score}} parameter.
> If you use a wrong value for {{score}}, you get the following error message 
> (sic!):
> 'score' local-param must be one of 'none', 'distance', or 'recipDistance'
> Finally, only three of the four operators seem to work. When trying the 
> {{DisjointTo}} (copied verbatim from the wiki page) operator, I got the 
> following exception:
> java.lang.IllegalArgumentException: Unknown Operation: DisjointTo



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to