Skip to content
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit 20a3157

Browse files
committed
Merge master
2 parents a59cc8e + 3dc622d commit 20a3157

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

content/v3/search.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ search results so that you can find the item that best meets your needs. To
1818
satisfy that need, the GitHub Search API provides **up to 1,000 results for each
1919
search**.
2020

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+
2129
### Rate limit
2230

2331
The Search API has a custom rate limit. For requests using [Basic

lib/resources.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,11 +1222,12 @@ def text_html(response, status, head = {})
12221222
]
12231223

12241224
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"
1225+
"ring.erl" => {
1226+
"size" => 932,
1227+
"raw_url" => "https://gist.githubusercontent.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl",
1228+
"type" => "text/plain",
1229+
"language" => "Erlang"
1230+
}
12301231
}
12311232

12321233
GIST = {
@@ -1237,7 +1238,7 @@ def text_html(response, status, head = {})
12371238
"description" => "description of gist",
12381239
"public" => true,
12391240
"user" => USER,
1240-
"files" => { "ring.erl" => GIST_FILE },
1241+
"files" => GIST_FILE,
12411242
"comments" => 0,
12421243
"comments_url" => "https://api.github.com/gists/#{SecureRandom.hex(10)}/comments/",
12431244
"html_url" => "https://gist.github.com/1",

0 commit comments

Comments
 (0)