summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2015-04-21 15:50:16 (GMT)
committerAlex Pott2015-04-21 15:54:36 (GMT)
commit6b91f5242e73f1d96c0e32fa526808540439e894 (patch)
tree87febe5dfdc35b8c71329fc18fad9bb827aa5264
parente9c8dcf882e1e047d6fb2fc47f1be5d456c06181 (diff)
Issue #2369675 by FMB, pstewart: Document that SearchQuery does not support orderBy in queries outside of addScore
-rw-r--r--core/modules/search/src/SearchQuery.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/modules/search/src/SearchQuery.php b/core/modules/search/src/SearchQuery.php
index c1ecb48..375ca2a 100644
--- a/core/modules/search/src/SearchQuery.php
+++ b/core/modules/search/src/SearchQuery.php
@@ -486,10 +486,10 @@ class SearchQuery extends SelectExtender {
* used. However, if at least one call to addScore() has taken place, the
* keyword relevance score is not automatically added.
*
- * Also note that if you call orderBy() directly on the query, search scores
- * will not automatically be used to order search results. Your orderBy()
- * expression can reference 'calculated_score', which will be the total
- * calculated score value.
+ * Note that you must use this method to add ordering to your searches, and
+ * not call orderBy() directly, when using the SearchQuery extender. This is
+ * because of the two-pass system the SearchQuery class uses to normalize
+ * scores.
*
* @param string $score
* The score expression, which should evaluate to a number between 0 and 1.