There was an error while loading. Please reload this page.
2 parents a59cc8e + 3dc622d commit 20a3157Copy full SHA for 20a3157
2 files changed
content/v3/search.md
@@ -18,6 +18,14 @@ search results so that you can find the item that best meets your needs. To
18
satisfy that need, the GitHub Search API provides **up to 1,000 results for each
19
search**.
20
21
+### Ranking search results
22
+
23
+Unless another sort option is provided as a query parameter, results are sorted
24
+by best match, as indicated by the `score` field for each item returned. This
25
+is a computed value representing the relevance of a item relative to the other
26
+items in the result set. Multiple factors are combined to boost the most
27
+relevant item to the top of the result list.
28
29
### Rate limit
30
31
The Search API has a custom rate limit. For requests using [Basic
lib/resources.rb
@@ -1222,11 +1222,12 @@ def text_html(response, status, head = {})
1222
]
1223
1224
GIST_FILE = {
1225
- "size" => 932,
1226
- "filename" => "ring.erl",
1227
- "raw_url" => "https://gist.githubusercontent.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl",
1228
- "type" => "text/plain",
1229
- "language" => "Erlang"
+ "ring.erl" => {
+ "size" => 932,
+ "raw_url" => "https://gist.githubusercontent.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl",
+ "type" => "text/plain",
+ "language" => "Erlang"
1230
+ }
1231
}
1232
1233
GIST = {
@@ -1237,7 +1238,7 @@ def text_html(response, status, head = {})
1237
1238
"description" => "description of gist",
1239
"public" => true,
1240
"user" => USER,
- "files" => { "ring.erl" => GIST_FILE },
1241
+ "files" => GIST_FILE,
1242
"comments" => 0,
1243
"comments_url" => "https://api.github.com/gists/#{SecureRandom.hex(10)}/comments/",
1244
"html_url" => "https://gist.github.com/1",
0 commit comments