_winds 发表于 2016-12-15 08:53:04

solr DataimportHanler fileld 出现null



  I'm working with Solr's schema.xml, and I know that I can usethe 'default' attribute to specify a default value which is to be used if a value for a given field has not been provided. However, say that I choose not to set the 'default' attribute, which default value will Solrthen fall back to?
  I would think that the field type which I've used for the given fieldwould have a default value which would be used, but I have had not success finding any details about this. Alternatively, I'd think that not providing a value and not setting a default value effectively would be as if that field does not exist for the particular document.
  However, I'm not sure and I'd like to know :-)
  UPDATE
  As far as I can see, Solr just throws an error and returns an error 400 "Bad Request" if no default value has been set and no value has beenprovided for a given field. In other words, Solr does not seem to applyany "fallback" default values in case no value is provided and no default value has been set in schema.xml.
  http://stackoverflow.com/questions/7332122/solr-what-are-the-default-values-for-fields-which-does-not-have-a-default-value


页: [1]
查看完整版本: solr DataimportHanler fileld 出现null