0
from djangosphinx.models import SphinxSearch
def xx(request):
    queryset =File.search.query('test')
    #return HttpResponse(queryset)#<------1
    return render_to_response('a.html',{'a':queryset})#<--------2

and

class File(models.Model):
    name = models.CharField(max_length=200)
    tags = models.CharField(max_length=200) # We actually store tags for efficiency in tag,tag,tag format here

    objects = models.Manager()
    search  = SphinxSearch(index="test1")

a.html:

{% for i in a %}
    Some value: {{i}}
{% endfor %}
Dan McGrath
  • 41,220
  • 11
  • 99
  • 130
zjm1126
  • 63,397
  • 81
  • 173
  • 221
  • Could you please rephrase the question in a manner that is more understandable? Posting the error seen, adding log file output etc are some ways to help people on SO understand what could've gone wrong. – viksit Feb 05 '10 at 19:12

1 Answers1

0

Since you are not giving a lot of info, I will make a educated guess. You probably didn't build you search index. Try building it before quering, sphynx search in the sindex, not in the DB.

Bite code
  • 578,959
  • 113
  • 301
  • 329