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

fix commitWithin for JSON updates w/o boost #421

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

eukaryote
Copy link
Contributor

  • add commitWithin to the Solr._update methodm and modify that method to include commitWithin as a query parameter if it is provided
  • remove the code that added commitWithin inside the add XML messages, so it's handled the same for botth XML and JSON
  • add a test case for commitWithin, which wasn't tested previously
  • this fixes a regression in 3.9.0 that resulted in add calls without a boost or fieldUpdates value no longer honoring the commitWithin if it was provided

 - 3.9.0 included changes such that the `commitWithin` arg
   to the `add` method was no longer used unless either
   `boost` or `fieldValues` was provided, since the new logic
   to support sending JSON docs doesn't use `commitWithin`
 - these changes add `commit_within` to the `Solr._update`
   method and modify that method to include `commitWithin`
   as a query parameter if it is provided, which is simpler
   than needing different logic for the two cases of XML
   and JSON docs
 - also added a test case for `commitWithin`, which wasn't
   tested previously
@acdha acdha merged commit 1ab9351 into django-haystack:master Sep 4, 2023
8 checks passed
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

Successfully merging this pull request may close these issues.

2 participants