Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit1d31205

Browse files
committed
document search api incomplete_results attribute
1 parent7e10528 commit1d31205

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
kind:change
3+
title:Understanding search results and potential timeouts
4+
created_at:2014-04-07
5+
author_name:izuzak
6+
---
7+
8+
Some queries are computationally expensive for our search infrastructure to
9+
execute. To keep the[Search API](/v3/search) fast for everyone, we limit how
10+
long any individual query can run. In rare situations when a query exceeds the
11+
time limit, the API returns all matches that were found prior to the timeout.
12+
13+
Starting today, the Search API also now[informs you when such a timeout
14+
happens](/v3/search/#timeouts-and-incomplete-results). Reaching a timeout does
15+
not necessarily mean that search results are incomplete. It just means that the
16+
query was discontinued before it searched through all possible data. More
17+
results might have been found, but also might not.
18+
19+
In some cases, if you know that your search results are potentially incomplete,
20+
you might think about the data differently. By exposing timeouts when they
21+
happen, the API helps you better understand how to interpret the results.
22+
23+
We hope this is useful as you integrate with the Search API. In the meantime,
24+
we're working on improving search so that these timeouts occur as rarely as
25+
possible. If you have any questions,[let us know](https://github.com/contact?form%5Bsubject%5D=Search+API).

‎content/v3/search.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ to make up to 5 requests per minute.
3737
See the[rate limit documentation](/v3/#rate-limiting) for details on
3838
determining your current rate limit status.
3939

40+
###Timeouts and incomplete results
41+
42+
To keep the Search API fast for everyone, we limit how long any individual query
43+
can run. For queries that[exceed the time limit](/changes/2014-04-07-understanding-search-results-and-potential-timeouts/),
44+
the API returns the matches that were already found prior to the timeout, and
45+
the response has the`incomplete_results` property set to`true`.
46+
47+
Reaching a timeout does not necessarily mean that search results are incomplete.
48+
More results might have been found, but also might not.
49+
4050
##Search repositories
4151

4252
Find repositories via various criteria. This method returns up to 100 results[per page](/v3/#pagination).

‎lib/resources.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,7 @@ def text_html(response, status, head = {})
769769

770770
ISSUE_SEARCH_V3_RESULTS={
771771
"total_count"=>280,
772+
"incomplete_results"=>false,
772773
"items"=>[
773774
{
774775
"url"=>"https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132",
@@ -896,6 +897,7 @@ def text_html(response, status, head = {})
896897

897898
REPO_SEARCH_V3_RESULTS={
898899
"total_count"=>40,
900+
"incomplete_results"=>false,
899901
"items"=>[
900902
{
901903
"id"=>3081286,
@@ -969,6 +971,7 @@ def text_html(response, status, head = {})
969971

970972
CODE_SEARCH_V3_RESULTS={
971973
"total_count"=>7,
974+
"incomplete_results"=>false,
972975
"items"=>[
973976
{
974977
"name"=>"classes.js",
@@ -1105,6 +1108,7 @@ def text_html(response, status, head = {})
11051108

11061109
USER_SEARCH_V3_RESULTS={
11071110
"total_count"=>12,
1111+
"incomplete_results"=>false,
11081112
"items"=>[
11091113
{
11101114
"login"=>"mojombo",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp