8000 An attempt to fix the config error in new Solr versions by andresmrm · Pull Request #2000 · django-haystack/django-haystack · GitHub
[go: up one dir, main page]

Skip to content

An attempt to fix the config error in new Solr versions #2000

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

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

andresmrm
Copy link
Contributor

Related to: #1986 (comment)

Co-authored-by: Christian Clauss <cclauss@me.com>
@andresmrm
Copy link
Contributor Author
andresmrm commented Nov 2, 2024

The last (I hope) problem seems to be with the extraction endpoint:

ERROR: test_content_extraction (test_haystack.solr_tests.test_solr_backend.LiveSolrContentExtractionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/django-haystack/django-haystack/test_haystack/solr_tests/test_solr_backend.py", line 1670, in test_content_extraction
    self.assertTrue("haystack" in data["contents"])
TypeError: argument of type 'NoneType' is not iterable

Edit: I tested locally on my Solr 9 and the response does return the data, but on different fields: "file" and "file_metadata".

@andresmrm
Copy link
Contributor Author
andresmrm commented Nov 2, 2024

I'm not sure, but I think this is a problem in pysolr. I'm guessing it expects the content in a field <filename>, but this changed to file. https://github.com/django-haystack/pysolr/blob/master/pysolr.py#L1287
The metadata field structure also seems to have changed.
I could handle these changes inside the test code, but, if what I said is true, it will probably continue to cause errors in other places.
I'll see if I can boot a Solr 7 to check.

Edit: Yeap. Solr 7 is returning <filename> and <filename>_metadata.

@andresmrm
Copy link
Contributor Author

I think the fix for pysolr would be something like this: django-haystack/pysolr#490

@andresmrm
Copy link
Contributor Author

Hi, @cclauss ! Any update on this? 😃

@andresmrm
Copy link
Contributor Author

Hi, @acdha ! Would you have time to take a look at this? 😁

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
0