collective / collective.solr

Solr search engine integration for Plone
https://pypi.org/project/collective.solr/
22 stars 46 forks source link

get rid of None values in prepareData @collective.solr/src/collective/solr/utils.py #276

Open zmijunkie opened 3 years ago

zmijunkie commented 3 years ago

Hi - I just made prepareData(data) on my computer leave like this:

# get rid of None values
filtered = {k: v for k, v in data.items() if v is not None}
data.clear()
data.update(filtered)

Does this make sense for anybody else ? My usecase is: I have a plentyful of attibutes and want to store only these with are not None. Also I found it weird to store Strings in Solr with a value of "None" but YUMV ?

thx for your input, Sascha

tisto commented 1 year ago

@reebalazs could this be related to your investigations regarding Null values in c.solr? Just wondering...