Wednesday, May 24, 2017

Re: Django+Haystack+Elastic issue

It is related with Django's pagination...

The results per page value can be set with:
HAYSTACK_SEARCH_RESULTS_PER_PAGE = 20
in the settings.py.

I had found and defined this setting before but it wasn't working because I had this in the HAYSTACK_CONNECTIONS dict (don't ask me why...).

I have increased it to 50 and I'm getting 50 hits.




On Thu, May 25, 2017 at 12:06 AM, Nick Gilmour <nickeforos@gmail.com> wrote:
Thanks for the hint!
It seems to be related with Django's pagination:
with:
{{ page.paginator.count }}
and
{{ page.paginator.num_pages }}
I can see that I have 58 hits and 3 pages, which is correct. 
I was getting maximal 2 pages with 20 pages each.
Now I have to check how pagination in Django works...


On Wed, May 24, 2017 at 4:55 PM, Avraham Serour <tovmeod@gmail.com> wrote:
it sounds like elastic is paginating, did you check that?

On Tue, May 23, 2017 at 12:41 AM, Nick Gilmour <nickeforos@gmail.com> wrote:
Hi all,

 

I'm following an example to setup Django with Haystack and ES from here:

https://krzysztofzuraw.com/blog/2016/haystack-elasticsearch-part-one.html


Everything seems to be working OK except from the number of the results – they are always maximal 20. But actually a single query should give more than 50 results.

So, where does this limitation come from? How can I change it?

I cannot find a setting neither for haystack nor for django which prevents showing more than 20 results.

 

Thanks,

Nick

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAH-drozT6m%2Be_KX4Kni_U5nJXQp8NF8EeXb9cJo5OOhtUt1LoQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFWa6tL%3D1Hb3Ud1PXw6AgBue2oq9t1YnVLaOs0CNGWqyrF36-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAH-droxKK24FFz59tqMRB-m_hdrUcHPp4EEThZTRq31ZuuLG5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment