Meta query add faster compare modes#3293
Open
mehulkaklotar wants to merge 29 commits intoWordPress:trunkfrom
Open
Meta query add faster compare modes#3293mehulkaklotar wants to merge 29 commits intoWordPress:trunkfrom
mehulkaklotar wants to merge 29 commits intoWordPress:trunkfrom
Conversation
…TARTSWITH, NOT ENDSWITH to the meta query value compares. They allow more performant regular query cases than REGEXP which would be the alternative.
…KE. Also extends this to key searches and adds testcases.
…keys in WP_Query directly
…d_faster_compare_modes
Implements DEV feedback
…ter_compare_modes
…m:JanThiel/wordpress-develop into 53450_meta_query_add_faster_compare_modes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the new LIKE based compare operators STARTSWITH, ENDSWITH, NOT STARTSWITH, NOT ENDSWITH to the meta query value compares.
They allow more performant and easier regular query cases than REGEXP which would be the alternative.
This PR is a fork from existing PR as contributor is temporarily unavailable to work on the changes.
Trac ticket: https://core.trac.wordpress.org/ticket/53450
Testing Instructions
Post 1 - Meta Key
xyz- Meta ValueabcMeta Query:
Post 1 - Meta Key ->
xyz- Meta ValueabcstartswithPost 2 - Meta Key ->
xyz- Meta ValueendswithabcPost 3 - Meta Key ->
xyz- Meta ValuecontainsabccontainsPost 4 - Meta Key ->
xyz- Meta ValuepqrPost 5 - Meta Key ->
xyz- Meta ValueabcabcabcMeta Query:
Meta Query:
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.