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

SearchQuerySet is instantiated at startup #1624

Closed
1 of 2 tasks
batisteo opened this issue Jul 4, 2018 · 0 comments
Closed
1 of 2 tasks

SearchQuerySet is instantiated at startup #1624

batisteo opened this issue Jul 4, 2018 · 0 comments

Comments

@batisteo
Copy link
Contributor

batisteo commented Jul 4, 2018

  • Tested with the latest Haystack release
  • Tested with the current Haystack master branch

Expected behaviour

No backend should be run during Django check or startup.

Actual behaviour

When using a SearchView, the SearchQuerySet is instantiated right away and messes with the correct language.

Steps to reproduce the behaviour

  1. Drop a print/breakpoint/assert in ElasticsearchSearchBackend.__init__()
  2. Run manage.py runserver
  3. Extra: if using AldrynSearch with a multilanguage setup, the wrong index is taken.

Configuration

  • Operating system version: Fedora 28
  • Search engine version: Elasticsearch Version: 2.4.6, Build: 5376dca/2017-07-18T12:17:44Z, JVM: 1.8.0_172
  • Python version: 3.5.5 [GCC 8.0.1 20180324 (Red Hat 8.0.1-0.20)] on linux
  • Django version: 1.11.13
  • Haystack version: 2.8.1
batisteo pushed a commit to batisteo/django-haystack that referenced this issue Jul 4, 2018
batisteo pushed a commit to batisteo/django-haystack that referenced this issue Jul 4, 2018
batisteo pushed a commit to batisteo/django-haystack that referenced this issue Jul 4, 2018
batisteo pushed a commit to batisteo/django-haystack that referenced this issue Jul 5, 2018
batisteo pushed a commit to batisteo/django-haystack that referenced this issue Jul 5, 2018
@acdha acdha closed this as completed in b607696 Jul 9, 2018
acdha added a commit that referenced this issue Jul 9, 2018
Fixes #1624:  SearchQuerySet is instantiated at startup
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

1 participant