In my Solr schema.xml, I have an integer field and text_general field
<field name="popularity" type="int" indexed="true" stored="true" />
<field name="priority" type="text_general" indexed="true" stored="true" />
When I try to index following data onto Solr, I get "400" Status: Bad Request
<add>
<doc>
<field name="popularity"></field>
<field name="id">id_001</field>
<field name="priority">10</field>
</doc>
</add>
While it works well when I index following data:
<add>
<doc>
<field name="popularity">5</field>
<field name="id">id_002</field>
<field name="priority"></field>
</doc>
</add>
So does that mean integer field can not be empty, while text_general can be?
I am using SolrPHPClient to index data. http://code.google.com/p/solr-php-client/
Isn't it also valid to not use a field that you don't want to set, so something like:
<add>
<doc>
<field name="id">id_001</field>
<field name="priority">10</field>
</doc>
</add>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With