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

Search score not correctly set on elements #2174

Closed
FrankZwiers opened this issue Dec 7, 2017 · 1 comment
Closed

Search score not correctly set on elements #2174

FrankZwiers opened this issue Dec 7, 2017 · 1 comment

Comments

@FrankZwiers
Copy link

FrankZwiers commented Dec 7, 2017

Description

The search score is not correctly set on elements in the populate function in ElementQuery.php.

Steps to reproduce

  1. Make basic template which utilizes search
    {% for entry in craft.entries.search("life").orderBy('score').all() %}
        Title: {{ entry.title }}<br>
        Searchscore: {{ entry.searchScore }}<br><br>
    {% endfor %}
  2. Notice searchscore is always empty

Additional info

Fix by fixing assigment in rules 970-974 of ElementQuery.php.

  • Craft version: 3.0.0-RC1
  • PHP version: 7.0.20
@brandonkelly
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants