I just updated to version 4.1.10 and can't index my site anymore.
I have updated with the latest archive (the search server zip) but my logs are filled with error when indexing stops.
Type search_api_solr
Date Jeudi, 19 novembre, 2020 - 21:52
Utilisateur administrateur
Emplacement https://www.example.com/fr/batch?_format=json&id=17065&op=do&op=do_nojs
Référent https://www.example.com/
Message Drupal\search_api_solr\SearchApiSolrException while indexing item entity:group/6:fr: Solr endpoint http://localhost:8983/ bad request (400). ERROR: [doc=6bep1j-index-entity:group/6:fr] multiple values encountered for non multiValued field its_flag_like_group: [1, 51, 7242, 16334] in Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase->handleHttpException() (line 1016 of /home/ubuntu/www-s1biose-com/web/modules/contrib/search_api_solr/src/SolrConnector/SolrConnectorPluginBase.php).
Severity Erreur
I deleted and recreated my collection but I have the same problem.
Comments
Comment #2
zenimagine commentedComment #3
murz@zenimagine, did you run `drush updb` after updating module? In last release the default behavior was changed, regarding to https://www.drupal.org/project/search_api_solr/issues/3153385 and you must update database, or manually set the option "Fallback to multiValued field types" in Server edit form.
Comment #4
mkalkbrenner@Murz is right. Existing configs are set to the old behavior by the update process.
My assumption is an erroneous config management. In many issues here in the project we saw that updb did uts job but a wrong config management replaced the new migrated config by an older one on deployment.
In some cases some people simply forget to to export and commit the new configs in their dev or staging system where they run updb.
Comment #5
zenimagine commentedI did "drush updb" and applied the last arch. friends i problem persists.
Comment #6
mkalkbrennerPlease check the the server settings. Under advanced "Fallback to multiValued field types" should have been checked if updb was applied correctly.
Otherwise you could simply avtivate it. But In that case I wonder what else might have been not set by updb.
Comment #7
murzzenimagine, can you check the current value of option "Fallback to multiValued field types" in your Solr Server edit form?
Comment #8
zenimagine commentedHere is a screenshot of the configuration.
Comment #9
mkalkbrennerSo the migration worked.
Do you have any custom code regarding processors, filed types, ...?
In 4.1.10 we fixed multiple issues where properties like "isList = FALSE" erroneously lead to multi values.
Comment #10
murzCan you post also configuration of
flag_like_groupfield, especiallycardinalityvalue of it? Seem search_api_solr can't detect, that it's cardinality more than 1.Comment #11
zenimagine commentedNo, I don't have a custom code.
@Murz Where can I find this configuration ?
Comment #12
murzLooking at the field name, it is created via Flag module, or via some other way (describe how did you create it)?
Comment #13
zenimagine commentedI don't know what you want. Here is a screenshot. I can't find any solution
Comment #14
zenimagine commentedWhat more can I do ?
Comment #15
mkalkbrennerPlease export and upload your index config here.
Comment #16
zenimagine commentedComment #17
mkalkbrennerNo. This is the Solr config-set. I meant the Drupal configuration that represents the Search API index.
Go to
/admin/config/development/configuration/single/exportto export it.Comment #18
zenimagine commented@mkalkbrenner Is that right ?
FILE : search_api.server.server.yml
Comment #19
mkalkbrennerWe're getting closer ;-)
That's the "Search Server".
Nearby you'll find the "Search Index". Export that one.
Comment #20
zenimagine commented:-)
search_api.index.index.yml
Comment #21
mkalkbrennerOK, this field seems to be added via a processor. Do you use https://www.drupal.org/project/flag_search_api for the flag_like_group field?
The module is a dependency in that config. I just ask to double check.
Comment #22
zenimagine commentedyes
Comment #23
zenimagine commentedI have "Like" flags and the user can choose in a view if they want to display the content that I like the most first. So I have to use this module, because Solr does not support flag
Comment #24
mkalkbrennerSeems like a bug in that module. Try this patch: #3183850: The Search API processor needs to declare that multiple flags are allowed.
Comment #25
zenimagine commentedThanks, the patch works ;-)
Comment #26
mkalkbrennerComment #27
mkalkbrennerComment #28
mkalkbrenner