Skip to content

Commit b26fe6b

Browse files
committed
searchScore and ordering by score
1 parent 0ac538e commit b26fe6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/5.x/system/searching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ $results = \craft\elements\Entry::find()
207207
See our [Search Form](kb:search-form) article for a complete example of listing dynamic search results.
208208
:::
209209

210-
When using the `search` param, each returned element will be have its [`searchScore`](#scoring-algorithm) attribute populated with a value representing how well the query matched.
210+
When using the `search` param and [ordering the results by score](#ordering-results-by-score), each returned element will be have its [`searchScore`](#scoring-algorithm) attribute populated with a value representing how well the query matched.
211211

212212
Passing user input to the `search` param is generally safe, but may allow discovery or enumeration of otherwise hidden field values. For instance, a savvy user might supply a query like `myPrivateNotesField:"*"` to test whether a field exists or has a specific value. _Carefully auditing which if your fields are [indexed](#configuring-custom-fields-for-search) will help prevent unwanted disclosure._
213213

0 commit comments

Comments
 (0)