On 9/15/06, mrstone <[EMAIL PROTECTED]> wrote: > > Hi > > I'm fiddling around with MySQL fulltext search and run into a problem. > > Using the below code works: > > match_expr = "MATCH(name) AGAINST (%s IN BOOLEAN MODE)" > qs = > Place.objects.all().filter(name__search=query).extra(select={'relevance': > match_expr}, params=[query]) > > > But when calling qs.count() I get: > TypeError at / > not all arguments converted during string formatting > > Is this a bug or am I using the extra in a wrong way?
I'm not sure this will fix your problem, but it might from my reading of the code. Try reversing the order of the filter() and extra() methods, i.e. qs = Place.objects.all().extra(select={'relevance': match_expr}, params=[query]).filter(name__search=query) -- This message has been scanned for memes and dangerous content by MindScanner, and is believed to be unclean. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---