#2559: Operators for search_fields
------------------------------------------------+---------------------------
 Reporter:  Andy Dustman <[EMAIL PROTECTED]>  |       Owner:  adrian
     Type:  enhancement                         |      Status:  new   
 Priority:  normal                              |   Milestone:        
Component:  Admin interface                     |     Version:        
 Severity:  normal                              |    Keywords:        
------------------------------------------------+---------------------------
 Currently, search_fields in Admin always do an icontains search, i.e.
 ILIKE %...% search where ... is the search term. This is inefficient and
 undesirable in many cases because you cannot use an index and the database
 must search all rows.
 
 The following patch (to be attached) extends this to add the following
 prefix operators and corresponding searches:
 
  * `^`: istartswith
  * `=`: iexact
  * [EMAIL PROTECTED]: search (full-text)
  * no prefix: icontains (current behavior)
 
 My tests indicate `^` makes my searches a lot faster. However, if there is
 at least one search field without a prefix, the database will still have
 to check every row.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2559>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@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-updates
-~----------~----~----~----~------~----~------~--~---

Reply via email to