Brilliant. That's precisely what the issue was.
The Wiki didn't give a context for where the <dynamicField> element was
supposed to go and I assumed (incorrectly) that it was in <types>. Of
course, I should not have assumed that and verified it independently.
Mea culpa.
Thanks the gentle application of the clue stick. <g>
On 7/15/2013 2:25 PM, Jack Krupansky wrote:
Make sure that <dynamicField>s are within <fields> rather than <types>.
Solr tends to ignore misplaced configuration elements.
-- Jack Krupansky
-----Original Message----- From: Scott Vanderbilt Sent: Monday, July 15,
2013 5:10 PM To: solr-user@lucene.apache.org Subject: Solr 4.3.1: Errors
When Attempting to Index LatLon Fields
I'm trying to index documents containing geo-spatial coordinates using
Solr 4.3.1 and am running into some difficulties. Whenever I attempt to
index a particular document containing a geospatial coordinate pair
(using post.jar), the operation fails as follows:
SimplePostTool version 1.5
Posting files to base url http://localhost:8080/solr/update using
content-type application/xml..
POSTing file rib00001.xml
SimplePostTool: WARNING: Solr returned an error #400 Bad Request
SimplePostTool: WARNING: IOException while reading response:
java.io.IOException: Server returned HTTP response code: 400 for
URL: http://localhost:8080/solr/update
1 files indexed.
COMMITting Solr index changes to http://localhost:8080/solr/update..
Time spent: 0:00:00.063
The solr log shows the following:
08:30:39 ERROR SolrCore org.apache.solr.common.SolrException:
undefined field: "geoFindspot_0_coordinate"
There relevant parts of my schema.xml are:
<field name="geoFindspot" type="location" indexed="true"
stored="true" multiValued="true"/>
...
<fieldType name="location" class="solr.LatLonType"
subFieldSuffix="_coordinate"/>
<dynamicField name="*_coordinate" type="tdouble" indexed="true"
stored="false" />
The document I am attempting to index has this field:
<field name="geoFindspot">51.512332,-0.090588</field>
As far as I can tell, my configuration complies with the instructions on
the relevant Wiki page (http://wiki.apache.org/solr/SpatialSearch) and I
can see nothing amiss.
Any suggestions as to why this is failing would be greatly appreciated.
Thank you!