collective / collective.solr

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

Problem with indexing empty lists / tuple (`None`) in Solr string fields #366

Closed laulaz closed 1 month ago

laulaz commented 8 months ago

Empty Dexterity fields of type List / Tuple (= None) are indexed by collective.solr in the <add> like this :

<field name="my_field" update="set">None</field>

As it is defined in Solr schema as string fields, we end up with :

<arr name="my_field">
      <str>None</str>
</arr>

After catalog.searchResults, the returned indexed value is ["None"]. We should have no arr instead.

It works correctly for List / Tuple fields (like Plone Subjects) only when there is a missing_value=() or missing_value=[].

tisto commented 2 months ago

@reebalazs didn't we fix this problem recently?

davisagli commented 1 month ago

This was fixed in https://github.com/collective/collective.solr/pull/370 and released in collective.solr 9.2.1