Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EZP-32108: Added CustomField sort clause #135

Merged
merged 4 commits into from
Dec 10, 2020
Merged

EZP-32108: Added CustomField sort clause #135

merged 4 commits into from
Dec 10, 2020

Conversation

adamwojs
Copy link
Member

@adamwojs adamwojs commented Nov 17, 2020

Question Answer
JIRA issue EZP-32108
Type feature
Target eZ Platform version v3.3
BC breaks no
Doc needed yes
Related PRs https://github.com/ezsystems/ezplatform-elastic-search-engine/pull/23
ezsystems/ezplatform-solr-search-engine#204

Added \eZ\Publish\API\Repository\Values\Content\Query\SortClause\CustomField which allows sort search results using raw search index field.

$query = new Query([
    'query' => new Criterion\MatchAll(),
    'sortClauses' => [
        new SortClause\CustomField('my_custom_field_s'),
    ],
]);

This sort clause is can be used in ad hoc tools and testing but should be avoid in production code.

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly (master for features, the oldest supported for bugs).
  • Ran PHP CS Fixer for new PHP code (use $ composer fix-cs).
  • Asked for a review (ping @ezsystems/php-dev-team).

@adamwojs adamwojs added the Feature New feature or request label Nov 17, 2020
@adamwojs adamwojs self-assigned this Nov 17, 2020
@adamwojs adamwojs changed the title EZP-32108: Added RawField sort clause EZP-32108: Added CustomField sort clause Dec 5, 2020
@adamwojs adamwojs marked this pull request as ready for review December 5, 2020 14:07
@sonarcloud
Copy link

sonarcloud bot commented Dec 10, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@adamwojs adamwojs merged commit 125ba1e into master Dec 10, 2020
@adamwojs adamwojs deleted the ezp_32108 branch December 10, 2020 12:21
Steveb-p pushed a commit that referenced this pull request Sep 27, 2022
Merge branch '1.3' of ezsystems/ezplatform-kernel into 4.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
5 participants