[Geoserver-devel] [jira] (GEOS-6918) SOLR store not properly handling default geometry for WFS request.

Caleb Mayer created an issue

GeoServer / BugGEOS-6918

SOLR store not properly handling default geometry for WFS request.

Issue Type:

BugBug

Assignee:

Andrea Aime

Created:

26/Feb/15 3:47 PM

Environment:

GeoServer 2.7-RC1 (Running on Centos 7, tomcat 7.0.42, java version “1.7.0_75”)
GeoServer-2.7-SNAPSHOT-solr-plugin (From 2015-02-20)
Solr-4.10.3 (Running on CentOS 6, Jetty 8.1.10, java version “1.7.0_75”)

Priority:

MajorMajor

Reporter:

Caleb Mayer

I’m having some trouble getting WFS to work with the Solr plugin for GeoServer. I have several polygons stored in Solr, and I’m able to load them onto a map using WMS just fine. However, when I try to use WFS, I get a syntax error from Solr. It seems like there is something wrong with the query that GeoServer is passing to Solr.

Here is the WFS request I’m using:

http://server:8080/geoserver/WORKSPACE/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=WORKSPACE:myLayerType&srs=EPSG:4326&format=text/javascript&format_options=callback:loadFeaturesBoundaries&bbox=-76.43702828511596,0,6.02966565566021e-11,76.43702828517625&callback=jQuery17201084845531731844_1424975764422&_=1424975764835

And here is the error I’m getting from Solr:

ERROR - 2015-02-26 14:30:09.373; org.apache.solr.common.SolrException; org.apache.solr.common.SolrException: org.apache.solr.search.SyntaxError: Cannot parse ‘layer_type:myLayerType AND :“Intersects(POLYGON ((-76.43702828511596 0, -76.43702828511596 76.43702828517625, 0.0000000000602967 76.43702828517625, 0.0000000000602967 0, -76.43702828511596 0)))”’: Encountered " “:” ": “” at line 1, column 35.
Was expecting one of:
<NOT> …
“+” …
“-” …
<BAREOPER> …
“(” …
" …
<QUOTED> …
<TERM> …
<PREFIXTERM> …
<WILDTERM> …
<REGEXPTERM> …
“[” …
“{” …
<LPARAMS> …
<NUMBER> …
<TERM> …
"
” …

I noticed that there is a section in the Solr query, right after the ‘AND’ section where it is expecting an attribute name, but it’s just blank.

I manually modified the query generated by Solr, added the attribute, ran it against Solr directly, and it worked fine:

http://server:8983/solr/collection1/select?q=%3A&fq=layer_type%3AmyLayerType&fq=location%3A%22Intersects(POLYGON+((-76.43702828511596+0%2C±76.43702828511596+76.43702828517625%2C+0.0000000000602967+76.43702828517625%2C+0.0000000000602967+0%2C±76.43702828511596+0)))%22&wt=json&indent=true

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)

Atlassian logo