Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeelia committed Nov 30, 2021
2 parents 003fc2f + 495bc1b commit 5af0a95
Show file tree
Hide file tree
Showing 35 changed files with 2,453 additions and 1,979 deletions.
47 changes: 45 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,53 @@ All notable changes to this project will be documented in this file, per [the Ke

## [Unreleased]

## [3.6.5] - 2021-11-23

**Note that the upcoming ElasticPress 4.0.0 release will remove built assets from the `develop` branch, will replace `master` with `trunk`, will add a zip with the plugin and its built assets in the GitHub release page, and will include a build script should you want to build assets from a branch.** As such, please plan to update any references you have from `master` to `trunk` or to GitHub releases depending on whether you require built assets or not.

Supported versions:

||Current (3.6.5)|4.0.0|
|---|:---:|:---:|
|Elasticsearch|5.0 - 7.9|5.2 - 7.10|
|WordPress|3.7.1+|5.6+|
|PHP|5.6+|7.0+|

### Added
- Docs: Link to the support page in README.md. Props [@brandwaffle](https://github.com/brandwaffle) via [#2436](https://github.com/10up/ElasticPress/pull/2436).
- New `ep_weighting_default_enabled_taxonomies` filter. Props [@felipeelia](https://github.com/felipeelia) and [@tott](https://github.com/tott) via [#2474](https://github.com/10up/ElasticPress/pull/2474).
- `$blog_id` and `$indexable_slug` parameters to the `ep_keep_index` filter. Props [@felipeelia](https://github.com/felipeelia) and [@brandwaffle](https://github.com/brandwaffle) via [#2478](https://github.com/10up/ElasticPress/pull/2478).

### Changed
- Add `$type` parameter to `ep_do_intercept_request` filter. Props [@rebeccahum](https://github.com/rebeccahum) and [@felipeelia](https://github.com/felipeelia) via [#2443](https://github.com/10up/ElasticPress/pull/2443).
- Cache the detected Posts mapping version, avoiding `get_mapping` calls in all admin requests. Props [@felipeelia](https://github.com/felipeelia) via [#2445](https://github.com/10up/ElasticPress/pull/2445).
- Docs: Required ES and WP versions planned for ElasticPress 4.0.0. Props [@felipeelia](https://github.com/felipeelia) via [#2442](https://github.com/10up/ElasticPress/pull/2442).
- The `admin.min.js` file was split in `notice.min.js` and `weighting.min.js`, being loaded accordingly. Props [@felipeelia](https://github.com/felipeelia) and [@barryceelen](https://github.com/barryceelen) via [#2476](https://github.com/10up/ElasticPress/pull/2476).

### Fixed
- Force fetching `ep_wpcli_sync_interrupted` transient from remote to allow for more reliable remote interruption. Props [@rinatkhaziev](https://github.com/rinatkhaziev) and [@rebeccahum](https://github.com/rebeccahum) via [#2433](https://github.com/10up/ElasticPress/pull/2433).
- Duplicate orderby statement in Users query. Props [@brettshumaker](https://github.com/brettshumaker), [@pschoffer](https://github.com/pschoffer), and [@rebeccahum](https://github.com/rebeccahum) via [#2435](https://github.com/10up/ElasticPress/pull/2435).
- When using offset and default maximum result window value for size, subtract offset from size. Props [@rebeccahum](https://github.com/rebeccahum) via [#2441](https://github.com/10up/ElasticPress/pull/2441).
- Order for Custom Search Results in autosuggest. Props [@felipeelia](https://github.com/felipeelia) and [@johnwatkins0](https://github.com/johnwatkins0) via [#2447](https://github.com/10up/ElasticPress/pull/2447).
- WP-CLI stats and status to output all indices related to ElasticPress. Props [@felipeelia](https://github.com/felipeelia) via [#2479](https://github.com/10up/ElasticPress/pull/2479).
- Tests: Ensure that Posts related queries use ElasticPress. Props [@Rahmon](https://github.com/Rahmon) via [#2401](https://github.com/10up/ElasticPress/pull/2401).
- Tests: PHPUnit and yoast/phpunit-polyfills. Props [@felipeelia](https://github.com/felipeelia) via [#2457](https://github.com/10up/ElasticPress/pull/2457).

### Security
- Bumped `path-parse` from 1.0.6 to 1.0.7. Props [@dependabot](https://github.com/dependabot) via [#2458](https://github.com/10up/ElasticPress/pull/2458).
- Bumped `10up-toolkit` from 1.0.12 to 1.0.13. Props [@felipeelia](https://github.com/felipeelia) via [#2467](https://github.com/10up/ElasticPress/pull/2467).

## [3.6.4] - 2021-10-26

**Note that the upcoming ElasticPress 4.0.0 release will remove built assets from the `develop` branch, will replace `master` with `trunk`, will build a stable release version including built assets into a `stable` branch, and will include a build script should you want to build assets from a branch.** As such, please plan to update any references you have from `master` to either `stable` or `trunk` depending on whether you require built assets or not.
**Note that the upcoming ElasticPress 4.0.0 release will remove built assets from the `develop` branch, will replace `master` with `trunk`, ~~will build a stable release version including built assets into a `stable` branch,~~ will add a zip with the plugin and its built assets in the GitHub release page, and will include a build script should you want to build assets from a branch.** As such, please plan to update any references you have from `master` to ~~either `stable` or~~ `trunk` or to GitHub releases depending on whether you require built assets or not.

Official PHP support is currently 5.6+. Minimum PHP version for ElasticPress 4.0.0 will be 7.0+.
Supported versions:

||Current (3.6.4)|4.0.0|
|---|:---:|:---:|
|Elasticsearch|5.0 - 7.9|5.2 - 7.10|
|WordPress|3.7.1+|5.6+|
|PHP|5.6+|7.0+|

### Added
- WP-CLI: New `get-mapping` command. Props [@tfrommen](https://github.com/tfrommen), [@felipeelia](https://github.com/felipeelia), and [@Rahmon](https://github.com/Rahmon) via [#2414](https://github.com/10up/ElasticPress/pull/2414).
Expand Down Expand Up @@ -1097,6 +1139,7 @@ See https://github.com/10up/ElasticPress/pulls?utf8=%E2%9C%93&q=is%3Apr+mileston
- Initial plugin release

[Unreleased]: https://github.com/10up/ElasticPress/compare/master...develop
[3.6.5]: https://github.com/10up/ElasticPress/compare/3.6.4...3.6.5
[3.6.4]: https://github.com/10up/ElasticPress/compare/3.6.3...3.6.4
[3.6.3]: https://github.com/10up/ElasticPress/compare/3.6.2...3.6.3
[3.6.2]: https://github.com/10up/ElasticPress/compare/3.6.1...3.6.2
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The `develop` branch is the development branch which means it contains the next

1. If the new version requires a reindex, add its number to the `$reindex_versions` array in the `ElasticPress\Upgrades::check_reindex_needed()` method. If it is the case, remember to add that information to the Changelog listings in `readme.txt` and `CHANGELOG.md`.
1. Branch: Starting from `develop`, cut a release branch named `release/X.Y.Z` for your changes.
1. Version bump: Bump the version number in `elasticpress.php`, `package.json`, `readme.txt`, and any other relevant files if it does not already reflect the version being released. In `elasticpress.php` update both the plugin "Version:" property and the plugin `EP_VERSION` constant.
1. Version bump: Bump the version number in `elasticpress.php`, `package.json`, `package-lock.json`, `readme.txt`, and any other relevant files if it does not already reflect the version being released. In `elasticpress.php` update both the plugin "Version:" property and the plugin `EP_VERSION` constant.
1. Changelog: Add/update the changelog in `CHANGELOG.md` and `readme.txt`, ensuring to link the [X.Y.Z] release reference in the footer of `CHANGELOG.md` (e.g., https://github.com/10up/ElasticPress/compare/X.Y.Z-1...X.Y.Z).
1. Props: Update `CREDITS.md` file with any new contributors, confirm maintainers are accurate.
1. Readme updates: Make any other readme changes as necessary. `README.md` is geared toward GitHub and `readme.txt` contains WordPress.org-specific content. The two are slightly different.
Expand Down
2 changes: 1 addition & 1 deletion CREDITS.md

Large diffs are not rendered by default.

24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@
[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Tests Status](https://github.com/10up/ElasticPress/actions/workflows/test.yml/badge.svg?branch=develop)](https://github.com/10up/ElasticPress) [![Release Version](https://img.shields.io/github/release/10up/ElasticPress.svg)](https://github.com/10up/ElasticPress/releases/latest) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v5.8%20tested-success.svg) [![MIT License](https://img.shields.io/github/license/10up/ElasticPress.svg)](https://github.com/10up/ElasticPress/blob/develop/LICENSE.md)

**Please note:** master is the stable branch.
* Check out the [ElasticPress Docs](http://10up.github.io/ElasticPress/)

**Note that the upcoming ElasticPress 4.0.0 release will remove built assets from the `develop` branch, will replace `master` with `trunk`, will build a stable release version including built assets into a `stable` branch, and will include a build script should you want to build assets from a branch.** As such, please plan to update any references you have from `master` to either `stable` or `trunk` depending on whether you require built assets or not.
**Please note:** master is the stable branch, but that will be changing with the 4.0.0 release (read more on that below).

**Search Algorithm Upgrade Notice:** Version 3.5 includes a revamp of the search algorithm. This is a backwards compatibility break. If you'd like to revert to the old search algorithm, you can use the following code: `add_filter( 'ep_search_algorithm_version', function() { return '3.4'; } );`. The new algorithm offers much more relevant search results and removes fuzziness which results in mostly unwanted results for most people. If you are hooking in and modifying the search query directly, it's possible this code might break and you might need to tweak it.
## Planned changes for 4.0.0

* Check out the [ElasticPress Docs](http://10up.github.io/ElasticPress/)
**Note that the upcoming ElasticPress 4.0.0 release will remove built assets from the `develop` branch, will replace `master` with `trunk`, ~~will build a stable release version including built assets into a `stable` branch,~~ will add a zip with the plugin and its built assets in the GitHub release page, and will include a build script should you want to build assets from a branch.** As such, please plan to update any references you have from `master` to ~~either `stable` or~~ `trunk` or to GitHub releases depending on whether you require built assets or not.

Supported versions:

||Current (3.6.4)|4.0.0|
|---|:---:|:---:|
|Elasticsearch|5.0 - 7.9|5.2 - 7.10|
|WordPress|3.7.1+|5.6+|
|PHP|5.6+|7.0+|

## Overview

Expand All @@ -20,6 +28,8 @@ ElasticPress, a fast and flexible search and query engine for WordPress, enables

ElasticPress has an in depth documentation site. [Visit the docs ☞](http://10up.github.io/ElasticPress/)

ElasticPress FAQs and tutorials can be found on our support site. [Visit the support site ☞](https://elasticpress.zendesk.com/hc/en-us)

## Requirements

* [Elasticsearch](https://www.elastic.co) 5.0+ **ElasticSearch max version supported: 7.9**
Expand All @@ -42,6 +52,12 @@ If you identify any errors or have an idea for improving the plugin, please [ope

A complete listing of all notable changes to ElasticPress are documented in [CHANGELOG.md](https://github.com/10up/elasticpress/blob/develop/CHANGELOG.md).

## Upgrade notices

### 3.5

**Search Algorithm Upgrade Notice:** Version 3.5 includes a revamp of the search algorithm. This is a backwards compatibility break. If you'd like to revert to the old search algorithm, you can use the following code: `add_filter( 'ep_search_algorithm_version', function() { return '3.4'; } );`. The new algorithm offers much more relevant search results and removes fuzziness which results in mostly unwanted results for most people. If you are hooking in and modifying the search query directly, it's possible this code might break and you might need to tweak it.

## Contributing

Please read [CODE_OF_CONDUCT.md](https://github.com/10up/elasticpress/blob/develop/CODE_OF_CONDUCT.md) for details on our code of conduct, [CONTRIBUTING.md](https://github.com/10up/elasticpress/blob/develop/CONTRIBUTING.md) for details on the process for submitting pull requests to us, and [CREDITS.md](https://github.com/10up/elasticpress/blob/develop/CREDITS.md) for a listing of maintainers of, contributors to, and libraries used by ElasticPress.
Expand Down
2 changes: 1 addition & 1 deletion assets/js/autosuggest.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ function checkForOrderedPosts(hits, searchTerm) {
});
}

return hits;
return filteredHits;
}

/**
Expand Down
19 changes: 19 additions & 0 deletions assets/js/notice.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { epAdmin, ajaxurl } = window;

jQuery('.notice').on('click', '.notice-dismiss', (event) => {
const notice = event.delegateTarget.getAttribute('data-ep-notice');

if (!notice) {
return;
}

jQuery.ajax({
method: 'post',
data: {
nonce: epAdmin.nonce,
action: 'ep_notice_dismiss',
notice,
},
url: ajaxurl,
});
});
20 changes: 0 additions & 20 deletions assets/js/admin.js → assets/js/weighting.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
const { epAdmin, ajaxurl } = window;

jQuery('.notice').on('click', '.notice-dismiss', (event) => {
const notice = event.delegateTarget.getAttribute('data-ep-notice');

if (!notice) {
return;
}

jQuery.ajax({
method: 'post',
data: {
nonce: epAdmin.nonce,
action: 'ep_notice_dismiss',
notice,
},
url: ajaxurl,
});
});

jQuery('.weighting-settings input[type=range]').on('input', function () {
const el = jQuery(this);

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@
"wpackagist-plugin/woocommerce":"*",
"phpunit/phpunit": "^7",
"10up/wpacceptance": "dev-master",
"phpcompatibility/phpcompatibility-wp": "*"
"phpcompatibility/phpcompatibility-wp": "*",
"yoast/phpunit-polyfills": "1.x-dev"
},
"scripts": {
"lint": "phpcs elasticpress.php includes",
"lint-fix": "phpcbf elasticpress.php includes",
"test": "phpunit",
"test-single-site": "phpunit -c single-site.xml.dist",
"setup-local-tests": "bash bin/install-wp-tests.sh ep_wp_test root password mysql trunk true"
"setup-local-tests": "bash bin/install-wp-tests.sh ep_wp_test root password 127.0.0.1 latest true"
},
"extra": {
"installer-paths": {
Expand Down
62 changes: 60 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5af0a95

Please sign in to comment.