Thanks a lot for your reply! I had »docValues="true"« in there before, but then thought I'd try out removing it to see if that helped. It didn't, and I forgot to re-add it before copying it into the mail. So, unfortunately, that's not it.
However, the other one seems to bring us a step closer to the solution: After adding <field name="bboxs_field_location_area" type="bbox" indexed="true" stored="false" multiValued="false"/> (even without removing the dynamic fields), this works indeed just fine! So, the question is what causes this, and it seems more and more like a bug instead of a user error. But I'll wait for a bit more feedback before filing a Jira. On 2014-11-23 14:10, Jack Krupansky wrote: > A difference I see in your snippet from the example is that you don't > have "docValues="true"" on the coordinate field type. You wrote: > > <fieldType name="_bbox_coord" class="solr.TrieDoubleField" > precisionStep="8" stored="false" /> > > But the example is: > > <fieldType name="_bbox_coord" class="solr.TrieDoubleField" > precisionStep="8" docValues="true" stored="false"/> > > Also, maybe try a static field rather than dynamic field, although the > latter should work anyway. > > Please file a Jira to request that Solr give a user-sensible error, not > a Lucene-level error. I mean, the Solr user has no ability to directly > invoke the "createFields" method. > > And now... let's see what David Smiley has to say about all of this! > > -- Jack Krupansky > > -----Original Message----- From: Thomas Seidl > Sent: Sunday, November 23, 2014 6:33 AM > To: solr-user@lucene.apache.org > Subject: Indexing problems with BBoxField > > Hi all, > > I just downloaded Solr 4.10.2 and wanted to try out the new BBoxField > type, but couldn't get it to work. The error (with status 400) I get is: > > ERROR: [doc=foo] Error adding field > 'bboxs_field_location_area'='ENVELOPE(25.89, 41.13, 47.07, 35.31)' > msg=java.lang.IllegalStateException: instead call createFields() because > isPolyField() is true > > Which, of course, is rather unhelpful for a user. > The relevant portions of my schema.xml look like this (largely copied > from [1]: > > <fieldType name="bbox" class="solr.BBoxField" geo="true" units="degrees" > numberType="_bbox_coord" /> > <fieldType name="_bbox_coord" class="solr.TrieDoubleField" > precisionStep="8" stored="false" /> > <dynamicField name="bboxs_*" type="bbox" indexed="true" stored="false" > multiValued="false"/> > > [1] https://cwiki.apache.org/confluence/display/solr/Spatial+Search > > And the request I send is this: > > <add> > <doc> > <field name="id">foo</field> > <field name="bboxs_field_location_area">ENVELOPE(25.89, 41.13, > 47.07, 35.31)</field> > </doc> > </add> > > Does anyone have any idea what could be going wrong here? > > Thanks a lot in advance, > Thomas >