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

Reply via email to