On 10/11/2013 3:02 PM, keshari.prerna wrote:
One of my indexing field have NULL values and i want it to be replaces with
0 while indexing itself. So that when i search after indexing it gives me 0
instead of NULL.

Most of your other replies have concentrated on the SQL side of things. One mentioned custom update processors. If you want a solution in SQL, or you are comfortable writing custom code, that's no problem, but I think there's another way.

NULL values in SQL, when imported with DIH, result in the Solr field simply not existing for that document. If you add a default value to your schema, then anytime there is no value, the default will be used. This should be much simpler than the other solutions.

<field name="myField" type="long" default="0" indexed="true" stored="true"/>

http://wiki.apache.org/solr/SchemaXml#Common_field_options

Thanks,
Shawn

Reply via email to