> What does the search funtion return?
> A django queryset or a xapian result and are you sure that
> the Paginator can handle the returned value?

Hmmm. Great question.

I believe it's returning a xapian result set.

In my template, I'm looping through the paginator.object_list. Here's
a simple example:

{% for result in paginator.object_list  %}
{{ result.get_object.name }}
{% endfor %}

This gets me the name of the Product. Although I'm only indexing the
Product.name and Product.description, I can get anything in the
Product model by using {{ result.get_object.fieldname }}.

If I replace {{ result.get_object.name }} with just {{ result }} in
the above loop, here's an example of 2 returned results:

<XapianHit: Model:Catalog.product pk:4, Score:96>
<XapianHit: Model:Catalog.product pk:1, Score:62>

ME
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to