It sounds like you've been using the right sorts of methods for that job, but the complexity of the query is getting to be too much :)
There's a 'regex' lookup... http://docs.djangoproject.com/en/dev/ref/models/querysets/#regex That's a pretty intense example text parsing search. I think the usual Django philosophy might conclude that whatever you've got in that field could be broken up into multiple fields? :) Unless it's a TextField, but then you might be best off with regex anyway. I can't quite wrap my brain around the requirement for such a lookup yet, because I've never yet come across the need for any raw SQL to go into my queries. Apologies if this doesn't really address the type of solution you need. Tim On Nov 24, 8:50 pm, valhalla <rjkers...@gmail.com> wrote: > Hi, > > I'm basically looking for the best way to implement something that > produces SQL similar to: > > select col1, col2 from table1 where col1 like '%this%is%some%search > %string?with?wildcards' > > I have worked around this with using the extra() method of the query > but this can get real messy real fast. > I have also split the string on the wild cards and chained startswith, > endswith and contains. but the contains elements don't maintain the > order that I would like (and sometime absolutely must have) > > does anyone have a neat solution to this that I have missed? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.