|
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
|