You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by yair even-zohar <ya...@yahoo.com> on 2012/07/24 15:44:23 UTC
problem using lat longfield
I'm using solr 3.5 via SIREn
I modified the schema.xml by adding:
<fields>
<field name="coordinate" type="LatLonType" indexed="true" stored="false" multiValued="false"/>
</fields>
My code is the following:
SolrInputDocument document = new SolrInputDocument();
SolrInputField inputField = new SolrInputField("coordinate");
String latlon = "40.777719,-73.978551";
inputField.addValue(latlon, 1.0F);
document.put("coordinate", inputField);
SolrServer server1 = new CommonsHttpSolrServer("http://localhost:8080/siren");
final UpdateRequest request = new UpdateRequest();
request.add(document);
request.process(server1);
and the error I'm getting is below.
Help is appreciated.
org.apache.solr.common.SolrException: Bad Request
Bad Request
request: http://localhost:8080/siren/update?wt=javabin&version=2
at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:432)
at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:246)
at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:105)
at com.fetch5.siren.SirenHelper.indexTabularFile(SirenHelper.java:195)
at com.fetch5.siren.SirenHelper.indexFile(SirenHelper.java:55)
at com.fetch5.siren.SirenHelper.main(SirenHelper.java:299)
Thanks
-Yair