Reputation: 2456
Hi I want to configure solr4.10 for spatial search for polygon , I have do following changes In schema.xml I have done changes as below
<fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType" spatialContextFactory="com.spatial4j.core.context.jts.JtsSpatialContextFactory" distErrPct="0.025" maxDistErr="0.000009" units="degrees"/>
Actualy this entry already exist but does not contain spatialContextFactory so added this one also.
Now document which I am inserting is as below
<add> <doc> <field name="id">3007</field> <field name="name">Autauga</field> <field name="coordinate">POLYGON((-10 30,-40 40,-10 -20,40 20,0 0,-10 30))</field> </doc> </add>
But when I try to insert the document with post.jar then it give exception as below
SimplePostTool version 1.5 Posting files to base url http://localhost:8983/solr/update using content-type application/xml.. POSTing file counties1.xml SimplePostTool: WARNING: Solr returned an error #404 (Not Found) for url: http://localhost:8983/solr/update SimplePostTool: WARNING: Response: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Error 404 Not Found</title> </head> <body><h2>HTTP ERROR 404</h2> <p>Problem accessing /solr/update. Reason: <pre> Not Found</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> </body> </html> SimplePostTool: WARNING: IOException while reading response: java.io.FileNotFoundException: http://localhost:8983/solr/update 1 files indexed. COMMITting Solr index changes to http://localhost:8983/solr/update.. SimplePostTool: WARNING: Solr returned an error #404 (Not Found) for url: http://localhost:8983/solr/update?commit=true SimplePostTool: WARNING: Response: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Error 404 Not Found</title> </head> <body><h2>HTTP ERROR 404</h2> <p>Problem accessing /solr/update. Reason: <pre> Not Found</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> </body> </html> Time spent: 0:00:00.017
Please let me know where I am wrong
Upvotes: 0
Views: 314
Reputation: 2456
Just place jts-1.13 in solr-4.10.1/example/solr-webapp/webapp/WEB-INF/lib directory, now data will index fine
Upvotes: 0