Just follow-ing up with this thread after a round of emails between Shahbaz and I…
David Smiley wrote > Ooooh, I see your confusion. You looked at code in an > UpdateRequestProcessor and expected it to work on the client in SolrJ. It > won't work for the reason that the code in the URP is creating a > non-string object (a Shape subclass) whereas SolrJ expects Strings or > numbers. You need to use Shape formatted strings. If you have a generic > Shape and want to serialize it to a String without special casing Point, > etc., then you can use SpatialContext.toString(shape). Shahbaz lodhi wrote > Hi, > > *Story:* > I am trying to index *JTS point* in following format; not successful > though: > Pt(x=55.76056,y=24.19167) > It is the format that i get by ctx.readShape( shapeString ). > > I don't get any error at reading shape or adding shape > to solrInputDocument but prompts "*error reading WKT*" on adding document > to solr (i.e. solrServer.add(solrInputDocument)). > * > * > > *Question:* > Is it a legal way to index: > solrInputDocument.addField("myGeoField", > JtsSpatialContext.GEO.readShape(shapeString)); > solr.add(solrInputDocument); > > or I'll have to stick to the WKT format. > > > > > Any help will be highly appreciated. > > Thanks, > > Shahbaz ----- Author: http://www.packtpub.com/apache-solr-3-enterprise-search-server/book -- View this message in context: http://lucene.472066.n3.nabble.com/Index-JTS-Point-in-Solr-Lucene-index-tp4095395p4098139.html Sent from the Solr - User mailing list archive at Nabble.com.