[wp-trac] [WordPress Trac] #56350: Allow exact search in REST API

WordPress Trac noreply at wordpress.org
Mon Aug 8 14:53:25 UTC 2022


#56350: Allow exact search in REST API
-----------------------------------+-----------------------------
 Reporter:  jimmyh61               |      Owner:  (none)
     Type:  enhancement            |     Status:  new
 Priority:  normal                 |  Milestone:  Awaiting Review
Component:  REST API               |    Version:  trunk
 Severity:  normal                 |   Keywords:
  Focuses:  rest-api, performance  |
-----------------------------------+-----------------------------
 Wordpress only allows full text search when using the REST API but doesn't
 allow exact search. Yet, the exact search is possible using a search query
 like:

 {{{
 http://website.com/?s=keyword&exact=1
 }}}

 When you have tens of thousands of posts, being forced to do a full text
 search can take several seconds and impacts the performance of the
 website.

 It would be an improvement to allow exact search in the
 WP_REST_Posts_Controller in order to allow REST API requests like:

 {{{
 http://website.com/wp-json/wp/v2/posts?s=keyword&exact=1
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56350>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list