Skip to content

Commit

Permalink
plugin version bump, changelog, better comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Timi-Artturi Mäkelä committed May 12, 2023
1 parent 57655f6 commit 9790346
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [2.0.7] - 2023-05-12

### Fixed
- Fixes tax_query `AND` operator.

## [2.0.6] - 2023-04-27

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: RediPress
* Plugin URI: https://github.com/devgeniem/redipress
* Description: A WordPress plugin that provides a blazing fast search engine and WP Query performance enhancements.
* Version: 2.0.6
* Version: 2.0.7
* Author: Geniem
* Author URI: http://www.geniem.fi/
* License: GPL3
Expand Down
5 changes: 3 additions & 2 deletions src/Search/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,9 @@ protected function meta_query() : ?string {
*
* This function runs itself recursively if the query has multiple levels.
*
* RediSearch documentation for tag queries:
* https://redis.io/docs/stack/search/reference/tags/
*
* @param array $query The block to create the block from.
* @param string $operator Possible operator of the parent array.
* @param boolean $prefix Whether to prefix the field with taxonomy_ or not.
Expand Down Expand Up @@ -620,8 +623,6 @@ public function create_taxonomy_query( array $query, string $operator = 'AND', b

// Note: if we are handling term conditions with AND operator
// we need to form the query like so (@taxonomy: {term1}) (@taxonomy: {term2})
// wrapping these condditions would break the query logic.
// https://redis.io/docs/stack/search/reference/tags/
$and_queries = [];

array_map( function( $term ) use ( $clause, $prefix, &$and_queries ) {
Expand Down

0 comments on commit 9790346

Please sign in to comment.