Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add() should accept empty list #261

Open
3 tasks done
puzzlet opened this issue May 31, 2019 · 4 comments
Open
3 tasks done

add() should accept empty list #261

puzzlet opened this issue May 31, 2019 · 4 comments

Comments

@puzzlet
Copy link

puzzlet commented May 31, 2019

I have

  • Tested with the latest release
  • Tested with the current master branch
  • Searched for similar existing issues

Expected behaviour

solr_client.add([{'id': 'myid', 'multivalued_field_to_overwrite': ['value1'], 'multivalued_field_to_flush': []}], fieldUpdates={'multivalued_field_to_overwrite': 'set', 'multivalued_field_to_flush': 'set'}) should remove all the values of multivalued_field_to_flush.

Actual behaviour

multivalued_field_to_flush values are intact.

Steps to reproduce the behaviour

In [8]: solr_client.add([{'id': 'myid', 'multivalued_field_to_overwrite': ['value1'], 'multivalued_field_to_flush': []}], fieldUpdates={'multivalued_field_to_overwrite': 'set', 'multivalued_field_to_flush': 'set'})

Then Solr._build_doc() generates the HTML body like: <add><doc><field name="id">myid</field><field name="multivalued_field_to_overwrite">value1</field></doc></add>.

This body message should also include <field name="multivalued_field_to_flush"></field> to properly remove the values.

Configuration

  • Operating system version: Ubuntu 19.04
  • Search engine version: Solr 7.7.1
  • Python version: 3.7.3
  • pysolr version: 3.8.1
@stale
Copy link

stale bot commented Aug 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 29, 2019
@stale stale bot closed this as completed Sep 28, 2019
@omllobet
Copy link

This problem is also happening to us.

@bluenote10
Copy link

It is always strange to see bots close issues based on inactivity. Just because no one has fixed the issue doesn't mean that the issue is gone.

@acdha
Copy link
Collaborator

acdha commented Nov 6, 2019

@bluenote10 I agree, but we get a ton of issues which are due to local configuration or installation mistakes, misunderstandings, etc. and most of those never get updated by the original reporter. You can re-open an issue at any time if it's still relevant and you're planning to work on it.

@acdha acdha reopened this Nov 6, 2019
@stale stale bot removed the stale label Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants