[wp-trac] [WordPress Trac] #53450: [WP_Meta_Query] Add faster LIKE based 'STARTSWITH' and 'ENDSWITH' compare modes for value query

WordPress Trac noreply at wordpress.org
Wed Jun 23 16:26:08 UTC 2021


#53450: [WP_Meta_Query] Add faster LIKE based 'STARTSWITH' and 'ENDSWITH' compare
modes for value query
-------------------------------------------------+-------------------------
 Reporter:  janthiel                             |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Query                                |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  dev-feedback has-patch needs-docs    |     Focuses:
  needs-codex has-unit-tests                     |  performance
-------------------------------------------------+-------------------------

Comment (by jorbin):

 Thanks Jantheil, this feels like a good improvement.

 One improvement to the tests I would like to see here is to do some things
 that should be more explicitly excluded. For example, in
 `test_meta_query_single_query_compare_startswith`, having a post that has
 a meta that contains but does not start with `ba` but does contain it.


 Also, tagging @boonebgorges to see if he has any opinion on this since he
 did a good amount of work on meta queries.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53450#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list