I'm trying to index geofield 7.x-2.0-alpha2 fields using solr 4.2 but I get this error a number of times in the log every time I'm doing drush solr-index where field_long_lat is my geofield field:
Level SEVERE Logger SolrCore org.apache.solr.common.SolrException: Error while creating field 'geos_field_long_lat{type=geohash,properties=indexed,stored,omitTermFreqAndPositions}' from value ','
org.apache.solr.common.SolrException: Error while creating field 'geos_field_long_lat{type=geohash,properties=indexed,stored,omitTermFreqAndPositions}' from value ','
I also have the drush info
DRUSH_BACKEND:{"type":"error","message":"WD Apache Solr: Indexing failed on one of the following entity ids: node\/18099, node\/18100, node\/18109, node\/18111, node\/18112, node\/18113, node\/18119, node\/18120, node\/18121, node\/18122, node\/18123, node\/18124, node\/18125, node\/18126, node\/18127, node\/18157, node\/18166, node\/18167, node\/18168, node\/18169 \"500\" Status: Server Error: Server Error{\"responseHeader\":{\"status\":500,\"QTime\":9},\"error\":{\"msg\":\"Error while creating field 'geos_field_long_lat{type=geohash,properties=indexed,stored,omitTermFreqAndPositions}' from value ','\",\"trace\":\"org.apache.solr.common.SolrException: Error while creating field 'geos_field_long_lat{type=geohash,properties=indexed,stored,omitTermFreqAndPositions}' from value ','\\n\\tat org.apache.solr.schema.FieldType.createField(FieldType.java:259)\\n\\tat org.apache.solr.schema.FieldType.createFields(FieldType.java:302)\\n\\tat org.apache.solr.update.DocumentBuilder.addField(DocumentBuilder.java:180)\\n\\tat org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:251)\\n\\tat org.apache.solr.update.AddUpdateCommand.getLuceneDocument(AddUpdateCommand.java:73)\\n\\tat org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:204)\\n\\tat org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:69)\\n\\tat org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51)\\n\\tat org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:477)\\n\\tat org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:346)\\n\\tat org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:100)\\n\\tat org.apache.solr.handler.loader.XMLLoader.processUpdate(XMLLoader.java:246)\\n\\tat org.apache.solr.handler.loader.XMLLoader.load(XMLLoader.java:173)\\n\\tat org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:92)\\n\\tat org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)\\n\\tat org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)\\n\\tat org.apache.solr.core.SolrCore.execute(SolrCore.java:1797)\\n\\tat org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:637)\\n\\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:343)\\n\\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:141)\\n\\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)\\n\\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)\\n\\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)\\n\\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)\\n\\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)\\n\\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)\\n\\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)\\n\\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)\\n\\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)\\n\\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)\\n\\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)\\n\\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)\\n\\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)\\n\\tat org.eclipse.jetty.server.Server.handle(Server.java:365)\\n\\tat org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)\\n\\tat org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)\\n\\tat org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:937)\\n\\tat org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:998)\\n\\tat org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856)\\n\\tat org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)\\n\\tat org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)\\n\\tat org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)\\n\\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)\\n\\tat org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)\\n\\tat java.lang.Thread.run(Thread.java:679)\\nCaused by: org.apache.solr.common.SolrException: com.spatial4j.core.exception.InvalidShapeException: incompatible dimension (2) and values (,). Only 0 values specified\\n\\tat org.apache.solr.schema.GeoHashField.toInternal(GeoHashField.java:97)\\n\\tat org.apache.solr.schema.FieldType.createField(FieldType.java:257)\\n\\t... 44 more\\nCaused by: com.spatial4j.core.exception.InvalidShapeException: incompatible dimension (2) and values (,). Only 0 values specified\\n\\tat com.spatial4j.core.io.ParseUtils.parsePointDouble(ParseUtils.java:111)\\n\\tat com.spatial4j.core.io.ParseUtils.parseLatitudeLongitude(ParseUtils.java:136)\\n\\tat org.apache.solr.schema.GeoHashField.toInternal(GeoHashField.java:95)\\n\\t... 45 more\\n\",\"code\":500}}\n","timestamp":1365359697.989,"memory":99076472,"error":null,"packet":"log"}
I can't tell what's wrong with these nodes. It indexes until it finds these nodes, then it continues to inspect for entities (nodes in this case) for content but it won't submit the "good" nodes back to solr.
I've tried geofield 7.x-2.x dev with the same results and in combination with apache solr 3.6 with no luck.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | geofield-apachesolr_index_issue-1955576-6.patch | 726 bytes | jemond |
Comments
Comment #0.0
Yorgg commentedupgraded to solr 4.2
Comment #1
finn lewisI had a similar error, specifically the "incompatible dimension (2) and values (,). Only 0 values specified" part.
For me it turned out that this was only happening for records which had empty lat/long values.
As it happens, I am only interested in indexing records which do have a lat/long value, so this was not a huge issue for me.
I can imagine others needing to index records where some do and some don't have lat/long data, so there should be a way around this, but I am no Solr expert, so I'll leave it for someone else to advise further.
Comment #2
Yorgg commentedAfter empty field value, solr wont index any further nodes. This shouldn't be lethal I think.
I've moved back to solr 3.6.2 so the output format is slightly different but the issue remains the same.
Comment #3
Yorgg commentedComment #4
mac_weber commented@stamina, issues are ALWAYS opened against -dev versions, except in very special cases.
I'm moving it to module
geofieldbecause the code to index this module is not on moduleapachesolr.I'm marking it as fixed because it is fixed on branch
7.x-2.xbecause I know indexing is working fine there.Fell free to re-open if it is not working on branch
7.x-1.x. If so, change only the version of this issue to7.x-1.x-dev and status to 'active'.Comment #6
jemond commentedThis issue does break those running beta1, so I needed a patch to get Solr working before the next release. I've attached a small patch taken from a2e0798.
For completeness sake, here is the error I was getting:
Indexing failed on one of the following entity ids: node/20228, node/20229, node/20231, node/20232, node/20233, node/20234, node/20235, node/20236, node/20237, node/20238, node/20239, node/20240, node/20241, node/20242, node/20243, node/20244, node/20245, node/20246, node/20247, node/20248
"400" Status: Bad Request: Bad RequestApache Tomcat/6.0.24 - Error report HTTP Status 400 - ERROR: [doc=1ins3m/node/20239] Error adding field 'geom_field_geofield'=','type Status reportmessage ERROR: [doc=1ins3m/node/20239] Error adding field 'geom_field_geofield'=','description The request sent by the client was syntactically incorrect (ERROR: [doc=1ins3m/node/20239] Error adding field 'geom_field_geofield'=',').Apache Tomcat/6.0.24
Comment #7
Yorgg commentedI moved from 7.x-1.x to 7.x-2.0-beta1 to test this patch but in my case the issue remains the same.
I also testes with 7.x-2.x-dev as of 26/08/2013, I did solr-delete-index and cleared the caches also though
Here's how it goes:
$ drush solr-index
Inspected 200 of 479 entities. Submitted 200 documents to Solr [ok]
WD Apache Solr: Indexing failed on one of the following entity ids: [error]
node/365182, node/365183, node/365184, node/365185, node/365186,
node/365187, node/365188, node/365189, node/365190, node/365191,
node/365193, node/365194, node/365195, node/365196, node/365197,
node/365198, node/365226, node/365755, node/365756, node/365757
"400" Status: ERROR: [doc=8b0yj8/node/365755] Error adding field
'locm_field_lats'=',': ERROR: [doc=8b0yj8/node/365755] Error adding
field 'locm_field_lats'=','
Error 400 ERROR: [doc=8b0yj8/node/365755] Error adding field
'locm_field_lats'=','
HTTP ERROR 400
Problem accessing /solr/update. Reason:
ERROR: [doc=8b0yj8/node/365755] Error adding field
'locm_field_lats'=','Powered by Jetty://
I need to reopen for 7.x-1.x branch but I guess I shouldn't touch the version of this issue now since there is a patch for 7.x-2.0-beta1
Should I create a new issue and make reference to this one, or create a new issue and reference it here?
Comment #8
mac_weber commented@jemond @stammina I'm not a maintainer of this project, but I think you better open a new issue.
Just a quick help, the Solr fix started with this patch I've created in another issue. Commit: 392077771803b06318e7ab9129cbf5d9c43f222b
Since them, there was 2 additional follow up commits. The commit @jemond used to crate the patch is only one of these follow-up commits, and of course has no effect without the previous fixes.
If you want to create patch for version beta, then you better check it out.
Comment #8.0
mac_weber commentedtrying to be more concise