Hello,
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
I am using the following software versions:
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")
When I make the same request via WMS the 'location' attribute does show up as
part is part of the query. Is there something preventing that part of the query
being built when using WFS? Any help would be much appreciated!
Thanks,
Caleb Mayer
Software Engineer
Harris Corporation-GCSD
Email: [email protected]<mailto:[email protected]>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users