[wp-trac] [WordPress Trac] #19738: meta_query should check for wildcards when using LIKE operator

WordPress Trac noreply at wordpress.org
Sun Nov 23 19:10:11 UTC 2014


#19738: meta_query should check for wildcards when using LIKE operator
-------------------------+-----------------------------
 Reporter:  ejdanderson  |       Owner:
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  Future Release
Component:  Query        |     Version:  3.2
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+-----------------------------

Comment (by Will Brownsberger):

 Boone, thank you for the feedback on this.

 Seems like WP is optimized for searching for posts using the taxomony
 framework and then just grabbing meta information about the post as
 additional data.  A search based on meta information is not a priority for
 normal blogging and not well supported by WP -- especially a search in
 which meta information is the only screen in the search so that the
 database has to plow through a lot of postmeta records.  I am doing a CRM
 plugin so the number of records being stored as special post-types is much
 greater than the number of regular posts and the meta searching bogs down.

 I was initially trying to write entirerly within WP's data structure, but
 I concluded that if I was going to be making changes to WP's database to
 support my plugin, it would do less violence to the framework and involve
 less risk of conflict simply to add a table to the database with its own
 well optimized index.  This forced a rewrite of all the data structure of
 the application, but probably for the better.  It also seems better for
 performance all round not to clutter the post and postmeta tables with a
 lot of records that could be effectively partioned in a separate table.

 /w.

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


More information about the wp-trac mailing list