Skip to content

Commit f028ac2

Browse files
committed
Merge branch 'master' into tax-query-updates
# Conflicts: # tests/query/post.php
2 parents 293013f + 917f868 commit f028ac2

File tree

4 files changed

+1996
-420
lines changed

4 files changed

+1996
-420
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A drop-in replacement for WP_Query to leverage Elasticsearch for complex queries
66

77
## Warning!
88

9-
This plugin is currently in pre-alpha development, and as such, no part of it is guaranteed. It works (the unit tests prove that), but we won't be concerned about backwards compatibility until the first release. If you choose to use this, please pay close attention to the commit log to make sure we don't break anything you've implemented.
9+
This plugin is currently in beta development, and as such, no part of it is guaranteed. It works (the unit tests prove that), but we won't be concerned about backwards compatibility until the first release. If you choose to use this, please pay close attention to the commit log to make sure we don't break anything you've implemented.
1010

1111

1212
## Instructions for use
@@ -45,6 +45,15 @@ In one regard, this is a safer way to use this library, because it will fall bac
4545

4646
Regardless of which way you use the library, everything else about the object should work as per usual.
4747

48+
## Differences with WP_Query and Unsupported Features
49+
50+
### Meta Queries
51+
52+
* **Regexp comparisons are not supported.** The regular expression syntax is slightly different in Elasticsearch vs. PHP, so even if we tried to support them, it would result in a lot of unexpected behaviors. Furthermore, regular expressions are very resource-intensive in Elasticsearch, so you're probably better off just using WP_Query for these queries regardless.
53+
* If you try to use a regexp query, ES_WP_Query will throw a `_doing_it_wrong()` notice.
54+
* **LIKE comparisons are incongruous with MySQL.** In ES_WP_Query, LIKE-comparison meta queries will run a `match` query against the analyzed meta values. This will behave similar to a keyword search and will generally be more useful than a LIKE query in MySQL. However, there are notably differences with the MySQL implementation and ES_WP_Query will very likely produce different search results, so don't expect it to be a drop-in replacement.
55+
56+
4857
## A note about WP_Query filters
4958

5059
Since this library removes MySQL from most of the equation, the typical WP_Query filters (`posts_where`, `posts_join`, etc.) become irrelevant or -- in some extreme situations -- conflicting.

0 commit comments

Comments
 (0)