elastic-site-search 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +58 -0
- data/.gitignore +10 -0
- data/.travis.yml +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +201 -0
- data/NOTICE.txt +3 -0
- data/README.md +418 -0
- data/Rakefile +1 -0
- data/elastic-site-search.gemspec +26 -0
- data/lib/data/ca-bundle.crt +3554 -0
- data/lib/elastic/site-search.rb +9 -0
- data/lib/elastic/site-search/client.rb +527 -0
- data/lib/elastic/site-search/configuration.rb +67 -0
- data/lib/elastic/site-search/exceptions.rb +11 -0
- data/lib/elastic/site-search/ext/backport-uri.rb +33 -0
- data/lib/elastic/site-search/request.rb +156 -0
- data/lib/elastic/site-search/result_set.rb +84 -0
- data/lib/elastic/site-search/sso.rb +22 -0
- data/lib/elastic/site-search/version.rb +5 -0
- data/logo-site-search.png +0 -0
- data/spec/client_spec.rb +728 -0
- data/spec/configuration_spec.rb +37 -0
- data/spec/fixtures/vcr/analytics_autoselects.yml +57 -0
- data/spec/fixtures/vcr/analytics_autoselects_with_document_type.yml +57 -0
- data/spec/fixtures/vcr/analytics_autoselects_with_document_type_and_time_range.yml +57 -0
- data/spec/fixtures/vcr/analytics_autoselects_with_time_range.yml +57 -0
- data/spec/fixtures/vcr/analytics_clicks.yml +57 -0
- data/spec/fixtures/vcr/analytics_clicks_with_document_type.yml +57 -0
- data/spec/fixtures/vcr/analytics_clicks_with_document_type_and_time_range.yml +57 -0
- data/spec/fixtures/vcr/analytics_clicks_with_time_range.yml +57 -0
- data/spec/fixtures/vcr/analytics_searches.yml +57 -0
- data/spec/fixtures/vcr/analytics_searches_with_document_type_and_time_range.yml +57 -0
- data/spec/fixtures/vcr/analytics_searches_with_time_range.yml +57 -0
- data/spec/fixtures/vcr/analytics_searchs_with_document_type.yml +57 -0
- data/spec/fixtures/vcr/analytics_top_no_result_queries.yml +57 -0
- data/spec/fixtures/vcr/analytics_top_no_result_queries_paginated.yml +57 -0
- data/spec/fixtures/vcr/analytics_top_queries.yml +57 -0
- data/spec/fixtures/vcr/analytics_top_queries_paginated.yml +57 -0
- data/spec/fixtures/vcr/analytics_top_queries_too_large.yml +53 -0
- data/spec/fixtures/vcr/async_create_or_update_document_failure.yml +48 -0
- data/spec/fixtures/vcr/async_create_or_update_document_success.yml +52 -0
- data/spec/fixtures/vcr/bulk_create_documents.yml +52 -0
- data/spec/fixtures/vcr/bulk_create_or_update_documents_failure.yml +47 -0
- data/spec/fixtures/vcr/bulk_create_or_update_documents_success.yml +52 -0
- data/spec/fixtures/vcr/bulk_create_or_update_documents_verbose_failure.yml +47 -0
- data/spec/fixtures/vcr/bulk_create_or_update_documents_verbose_success.yml +52 -0
- data/spec/fixtures/vcr/bulk_destroy_documents.yml +47 -0
- data/spec/fixtures/vcr/crawl_url.yml +47 -0
- data/spec/fixtures/vcr/create_document.yml +52 -0
- data/spec/fixtures/vcr/create_document_type.yml +47 -0
- data/spec/fixtures/vcr/create_domain.yml +47 -0
- data/spec/fixtures/vcr/create_engine.yml +47 -0
- data/spec/fixtures/vcr/create_or_update_document_create.yml +51 -0
- data/spec/fixtures/vcr/create_or_update_document_update.yml +51 -0
- data/spec/fixtures/vcr/create_user.yml +47 -0
- data/spec/fixtures/vcr/destroy_document.yml +43 -0
- data/spec/fixtures/vcr/destroy_document_type.yml +43 -0
- data/spec/fixtures/vcr/destroy_domain.yml +43 -0
- data/spec/fixtures/vcr/destroy_engine.yml +43 -0
- data/spec/fixtures/vcr/destroy_non_existent_document_type.yml +45 -0
- data/spec/fixtures/vcr/document_receipts_multiple.yml +48 -0
- data/spec/fixtures/vcr/document_receipts_multiple_complete.yml +48 -0
- data/spec/fixtures/vcr/document_type_search.yml +63 -0
- data/spec/fixtures/vcr/document_type_search_pagination.yml +47 -0
- data/spec/fixtures/vcr/document_type_suggest.yml +52 -0
- data/spec/fixtures/vcr/document_type_suggest_pagination.yml +47 -0
- data/spec/fixtures/vcr/engine_search.yml +67 -0
- data/spec/fixtures/vcr/engine_search_facets.yml +164 -0
- data/spec/fixtures/vcr/engine_search_pagination.yml +47 -0
- data/spec/fixtures/vcr/engine_suggest.yml +55 -0
- data/spec/fixtures/vcr/engine_suggest_pagination.yml +47 -0
- data/spec/fixtures/vcr/find_document.yml +50 -0
- data/spec/fixtures/vcr/find_document_type.yml +47 -0
- data/spec/fixtures/vcr/find_domain.yml +47 -0
- data/spec/fixtures/vcr/find_domain_failure.yml +45 -0
- data/spec/fixtures/vcr/find_engine.yml +47 -0
- data/spec/fixtures/vcr/list_document_type.yml +47 -0
- data/spec/fixtures/vcr/list_documents.yml +71 -0
- data/spec/fixtures/vcr/list_documents_with_pagination.yml +71 -0
- data/spec/fixtures/vcr/list_domains.yml +47 -0
- data/spec/fixtures/vcr/list_engines.yml +48 -0
- data/spec/fixtures/vcr/list_users.yml +47 -0
- data/spec/fixtures/vcr/list_users_with_pagination.yml +47 -0
- data/spec/fixtures/vcr/log_clickthrough_failure.yml +45 -0
- data/spec/fixtures/vcr/log_clickthrough_success.yml +47 -0
- data/spec/fixtures/vcr/recrawl_domain_failure.yml +46 -0
- data/spec/fixtures/vcr/recrawl_domain_success.yml +47 -0
- data/spec/fixtures/vcr/show_user.yml +47 -0
- data/spec/fixtures/vcr/update_document.yml +50 -0
- data/spec/fixtures/vcr/update_document_unknown_field_failure.yml +48 -0
- data/spec/fixtures/vcr/update_documents_failure_non_existent_document.yml +47 -0
- data/spec/fixtures/vcr/update_documents_success.yml +47 -0
- data/spec/fixtures/vcr/users_client_secret_incorrect.yml +44 -0
- data/spec/fixtures/vcr/users_no_api_key.yml +44 -0
- data/spec/fixtures/vcr/users_no_client_id_or_secret.yml +45 -0
- data/spec/platform_spec.rb +95 -0
- data/spec/spec_helper.rb +27 -0
- data/spec/ssl_spec.rb +34 -0
- data/spec/sso_spec.rb +24 -0
- metadata +279 -0
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/users.json?client_id=0d94f7cf2bd1e65a7e1f9f929d1bcb2b248af69b8112d24484e87014125538f8&client_secret=f600fb0b16b516cbb9b9f0eeb60f3b35f685b5ec4a94694ae57b5bbb8860f240&page=2
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*'
|
12
|
+
X-Swiftype-Client:
|
13
|
+
- elastic-app-search-ruby
|
14
|
+
X-Swiftype-Client-Version:
|
15
|
+
- 1.0.0
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
X-Ua-Compatible:
|
26
|
+
- IE=Edge
|
27
|
+
Etag:
|
28
|
+
- ! '"d751713988987e9331980363e24189ce"'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
Set-Cookie:
|
32
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWY4ZTBmZDFkY2IxYzlmNDg3MmQ4NGNkZjExYmI3NmRlBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--2235d3b123ac9c7407cc1d4f7964d816f0948011;
|
33
|
+
path=/; HttpOnly
|
34
|
+
X-Request-Id:
|
35
|
+
- 908b69372144b9a8e2c3014fd8f784b1
|
36
|
+
X-Runtime:
|
37
|
+
- '0.045036'
|
38
|
+
Connection:
|
39
|
+
- close
|
40
|
+
Server:
|
41
|
+
- thin 1.5.0 codename Knife
|
42
|
+
body:
|
43
|
+
encoding: US-ASCII
|
44
|
+
string: ! '[]'
|
45
|
+
http_version:
|
46
|
+
recorded_at: Fri, 13 Sep 2013 00:53:23 GMT
|
47
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,45 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/engines/site-search-api-example/document_types/videos/analytics/log_clickthrough.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"q":null,"id":"FtX8nswnUKU"}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! "*/*"
|
12
|
+
X-Swiftype-Client:
|
13
|
+
- elastic-app-search-ruby
|
14
|
+
X-Swiftype-Client-Version:
|
15
|
+
- 1.0.0
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 400
|
21
|
+
message: Bad Request
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
X-Ua-Compatible:
|
26
|
+
- IE=Edge
|
27
|
+
Cache-Control:
|
28
|
+
- no-cache
|
29
|
+
Set-Cookie:
|
30
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWFlOGQ0Yzg1Yjg5MDU4M2E0MjFiY2ZjYzgyZGViYTljBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--beefa75ecb409269e6210641c4ca982a3e865ac9;
|
31
|
+
path=/; HttpOnly
|
32
|
+
X-Request-Id:
|
33
|
+
- e078385a4d1d8982a0e84158c18442fd
|
34
|
+
X-Runtime:
|
35
|
+
- "0.032657"
|
36
|
+
Connection:
|
37
|
+
- close
|
38
|
+
Server:
|
39
|
+
- thin 1.5.0 codename Knife
|
40
|
+
body:
|
41
|
+
encoding: US-ASCII
|
42
|
+
string: ! " "
|
43
|
+
http_version:
|
44
|
+
recorded_at: Thu, 12 Sep 2013 23:01:24 GMT
|
45
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/engines/site-search-api-example/document_types/videos/analytics/log_clickthrough.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"q":"foo","id":"FtX8nswnUKU"}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! "*/*"
|
12
|
+
X-Swiftype-Client:
|
13
|
+
- elastic-app-search-ruby
|
14
|
+
X-Swiftype-Client-Version:
|
15
|
+
- 1.0.0
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
X-Ua-Compatible:
|
26
|
+
- IE=Edge
|
27
|
+
Etag:
|
28
|
+
- ! '"7215ee9c7d9dc229d2921a40e899ec5f"'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
Set-Cookie:
|
32
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJThjMWQwNzc4ZjljMjJlNmJlOTU0NzgyYTM5OWUyMmU2BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--4d7dc75d8371e4ff995c8345280749c4e9dd2500;
|
33
|
+
path=/; HttpOnly
|
34
|
+
X-Request-Id:
|
35
|
+
- c674acf5da1089346b57f4ff2be52ba7
|
36
|
+
X-Runtime:
|
37
|
+
- "0.043841"
|
38
|
+
Connection:
|
39
|
+
- close
|
40
|
+
Server:
|
41
|
+
- thin 1.5.0 codename Knife
|
42
|
+
body:
|
43
|
+
encoding: US-ASCII
|
44
|
+
string: ! " "
|
45
|
+
http_version:
|
46
|
+
recorded_at: Thu, 12 Sep 2013 23:00:17 GMT
|
47
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/engines/crawler-demo-site/domains/51534c6e2ed960cc79000001/recrawl.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*'
|
12
|
+
X-Swiftype-Client:
|
13
|
+
- elastic-app-search-ruby
|
14
|
+
X-Swiftype-Client-Version:
|
15
|
+
- 1.0.0
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 403
|
21
|
+
message: Forbidden
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
X-Ua-Compatible:
|
26
|
+
- IE=Edge
|
27
|
+
Cache-Control:
|
28
|
+
- no-cache
|
29
|
+
Set-Cookie:
|
30
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWRiNjMxNTIyMmE1YzBkZGQ3YjVlODk0Zjc3YWRhY2Y3BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--3903145083ee009433e6491589e03425b6148b99;
|
31
|
+
path=/; HttpOnly
|
32
|
+
X-Request-Id:
|
33
|
+
- 72d38e905d05fceba85477f7daa8a884
|
34
|
+
X-Runtime:
|
35
|
+
- '0.037684'
|
36
|
+
Connection:
|
37
|
+
- close
|
38
|
+
Server:
|
39
|
+
- thin 1.5.0 codename Knife
|
40
|
+
body:
|
41
|
+
encoding: US-ASCII
|
42
|
+
string: ! '{"error":"You must wait at least 24 hours between forced crawls of
|
43
|
+
a domain."}'
|
44
|
+
http_version:
|
45
|
+
recorded_at: Thu, 12 Sep 2013 23:18:11 GMT
|
46
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/engines/crawler-demo-site/domains/51534c6e2ed960cc79000001/recrawl.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*'
|
12
|
+
X-Swiftype-Client:
|
13
|
+
- elastic-app-search-ruby
|
14
|
+
X-Swiftype-Client-Version:
|
15
|
+
- 1.0.0
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
X-Ua-Compatible:
|
26
|
+
- IE=Edge
|
27
|
+
Etag:
|
28
|
+
- ! '"c7ea64ce75482ff6c299922bcd87b7af"'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
Set-Cookie:
|
32
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTU3NzY5ZDdkNTczMWE3M2ZlNzYzM2UwYzYxZDY0NDA4BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--297355ac4365e74626d6fad5723a0b9e3040bbce;
|
33
|
+
path=/; HttpOnly
|
34
|
+
X-Request-Id:
|
35
|
+
- 2ecfbbc7f75f38574762fd8de10e1289
|
36
|
+
X-Runtime:
|
37
|
+
- '0.173744'
|
38
|
+
Connection:
|
39
|
+
- close
|
40
|
+
Server:
|
41
|
+
- thin 1.5.0 codename Knife
|
42
|
+
body:
|
43
|
+
encoding: US-ASCII
|
44
|
+
string: ! '{"id":"51534c6e2ed960cc79000001","engine_id":"51534c502ed960a1e6000005","submitted_url":"http://crawler-demo-site.herokuapp.com/","start_crawl_url":"http://crawler-demo-site.herokuapp.com/","crawling":false,"document_count":5,"updated_at":"2013-09-12T23:15:31Z"}'
|
45
|
+
http_version:
|
46
|
+
recorded_at: Thu, 12 Sep 2013 23:15:31 GMT
|
47
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/users/5230b8c82ed960ba2000001d.json?client_id=0d94f7cf2bd1e65a7e1f9f929d1bcb2b248af69b8112d24484e87014125538f8&client_secret=f600fb0b16b516cbb9b9f0eeb60f3b35f685b5ec4a94694ae57b5bbb8860f240
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*'
|
12
|
+
X-Swiftype-Client:
|
13
|
+
- elastic-app-search-ruby
|
14
|
+
X-Swiftype-Client-Version:
|
15
|
+
- 1.0.0
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
X-Ua-Compatible:
|
26
|
+
- IE=Edge
|
27
|
+
Etag:
|
28
|
+
- ! '"287d8777cdc43d5bc81fc46789fd568c"'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
Set-Cookie:
|
32
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWYyYjYzZTI3YjE4NWM5ZGZlOGNhNGMxODEwMWVjMDUzBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--0f60f350f59b58ccd69958c6dffc56cadd945f44;
|
33
|
+
path=/; HttpOnly
|
34
|
+
X-Request-Id:
|
35
|
+
- f32060d8af33e800aaf421fc8f252bd3
|
36
|
+
X-Runtime:
|
37
|
+
- '0.109367'
|
38
|
+
Connection:
|
39
|
+
- close
|
40
|
+
Server:
|
41
|
+
- thin 1.5.0 codename Knife
|
42
|
+
body:
|
43
|
+
encoding: US-ASCII
|
44
|
+
string: ! '{"id":"5230b8c82ed960ba2000001d","access_token":"0381294b7ef41db44fba20aad86a52d294b9fae67a26e85139d323eb78106706"}'
|
45
|
+
http_version:
|
46
|
+
recorded_at: Fri, 13 Sep 2013 00:53:23 GMT
|
47
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/engines/site-search-api-example/document_types/videos/documents/FtX8nswnUKU/update_fields.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"fields":{"title":"awesome new title","channel_id":"UC5VA5j05FjETg-iLekcyiBw"}}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! "*/*"
|
12
|
+
X-Swiftype-Client:
|
13
|
+
- elastic-app-search-ruby
|
14
|
+
X-Swiftype-Client-Version:
|
15
|
+
- 1.0.0
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
X-Ua-Compatible:
|
26
|
+
- IE=Edge
|
27
|
+
Etag:
|
28
|
+
- ! '"6700c44c03d4417c97bc50f69b6edd21"'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
Set-Cookie:
|
32
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTZkMDc4NjU2ZGQwMWZjN2MzNDM1ZGRjZDkyMzRlZDAxBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--a01d4013cdba077d3695886bededefd43470579c;
|
33
|
+
path=/; HttpOnly
|
34
|
+
X-Request-Id:
|
35
|
+
- ddc1aa098789c7bd0d536ab52f6f9dd7
|
36
|
+
X-Runtime:
|
37
|
+
- "0.044017"
|
38
|
+
Connection:
|
39
|
+
- close
|
40
|
+
Server:
|
41
|
+
- thin 1.5.0 codename Knife
|
42
|
+
body:
|
43
|
+
encoding: US-ASCII
|
44
|
+
string:
|
45
|
+
! '{"external_id":"FtX8nswnUKU","engine_id":"51b92f982ed960a844000248","document_type_id":"523231e62ed9605898000020","id":"523231eb2ed9605898000027","_id":"523231eb2ed9605898000027","updated_at":"2013-09-12T22:40:58Z","url":"http://www.youtube.com/watch?v=FtX8nswnUKU","thumbnail_url":"https://i.ytimg.com/vi/FtX8nswnUKU/mqdefault.jpg","channel_id":"UC5VA5j05FjETg-iLekcyiBw","title":"awesome
|
46
|
+
new title","caption":"http://www.facebook.com/pages/Kittens-Inspired-by-Kittens/49930012799","category_name":"Pets
|
47
|
+
& Animals","category_id":"15","published_at":"2008-09-01T14:25:17Z","duration":92,"view_count":17228767,"like_count":47388}'
|
48
|
+
http_version:
|
49
|
+
recorded_at: Thu, 12 Sep 2013 22:40:58 GMT
|
50
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,48 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/engines/site-search-api-example/document_types/videos/documents/FtX8nswnUKU/update_fields.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"fields":{"not_a_field":"not a field"}}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! "*/*"
|
12
|
+
X-Swiftype-Client:
|
13
|
+
- elastic-app-search-ruby
|
14
|
+
X-Swiftype-Client-Version:
|
15
|
+
- 1.0.0
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 400
|
21
|
+
message: Bad Request
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
X-Ua-Compatible:
|
26
|
+
- IE=Edge
|
27
|
+
Cache-Control:
|
28
|
+
- no-cache
|
29
|
+
Set-Cookie:
|
30
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTAyNzA5MzQyMWU1YjAxMzQ4NDVkNGMxNDIxZWUyZmFhBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--2f8beaf078c885a87f8fe33dc37fff06995d1993;
|
31
|
+
path=/; HttpOnly
|
32
|
+
X-Request-Id:
|
33
|
+
- 0ee335dac175f232bf27d29dc65cc45a
|
34
|
+
X-Runtime:
|
35
|
+
- "0.034146"
|
36
|
+
Connection:
|
37
|
+
- close
|
38
|
+
Server:
|
39
|
+
- thin 1.5.0 codename Knife
|
40
|
+
body:
|
41
|
+
encoding: US-ASCII
|
42
|
+
string:
|
43
|
+
! '{"error":"Error updating field(s). Attempt to set() nonexistent key. Known
|
44
|
+
keys are: url, thumbnail_url, channel_id, title, caption, category_name, category_id,
|
45
|
+
published_at, duration, view_count, like_count"}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Thu, 12 Sep 2013 22:40:58 GMT
|
48
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/engines/site-search-api-example/document_types/videos/documents/bulk_update.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"documents":[{"external_id":"not_there","fields":[{"name":"title","value":"hi","type":"string"}]}]}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! "*/*"
|
12
|
+
X-Swiftype-Client:
|
13
|
+
- elastic-app-search-ruby
|
14
|
+
X-Swiftype-Client-Version:
|
15
|
+
- 1.0.0
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
X-Ua-Compatible:
|
26
|
+
- IE=Edge
|
27
|
+
Etag:
|
28
|
+
- ! '"f9e544f77b7eac7add281ef28ca5559f"'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
Set-Cookie:
|
32
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTkzYTQ3NTIwNGRmMWY3MTkyMDVmNGZiZTM3ZWU1ZDQyBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--8efc561386be1984b12246d0ab067933720a0179;
|
33
|
+
path=/; HttpOnly
|
34
|
+
X-Request-Id:
|
35
|
+
- a9fd5dc44eb51d4a7d37fd53b165ba3a
|
36
|
+
X-Runtime:
|
37
|
+
- "0.150458"
|
38
|
+
Connection:
|
39
|
+
- close
|
40
|
+
Server:
|
41
|
+
- thin 1.5.0 codename Knife
|
42
|
+
body:
|
43
|
+
encoding: US-ASCII
|
44
|
+
string: ! "[false]"
|
45
|
+
http_version:
|
46
|
+
recorded_at: Thu, 12 Sep 2013 22:46:53 GMT
|
47
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/engines/site-search-api-example/document_types/videos/documents/bulk_update.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"documents":[{"external_id":"INscMGmhmX4","fields":{"title":"hi"}},{"external_id":"XfY9Dsg_DZk","fields":{"title":"bye"}}]}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! "*/*"
|
12
|
+
X-Swiftype-Client:
|
13
|
+
- elastic-app-search-ruby
|
14
|
+
X-Swiftype-Client-Version:
|
15
|
+
- 1.0.0
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
X-Ua-Compatible:
|
26
|
+
- IE=Edge
|
27
|
+
Etag:
|
28
|
+
- ! '"bb009c6dcb5c622766ad5aa1ea1562d9"'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
Set-Cookie:
|
32
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWM1YzRmN2EwYjg5NzU5YjU3MDE4ZTg0OWUyMzc0ZWU3BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--f928b9637411dd24c049b64c4bb0ca7455bb0508;
|
33
|
+
path=/; HttpOnly
|
34
|
+
X-Request-Id:
|
35
|
+
- 904d7bc728da1bbcb64649cbfb310078
|
36
|
+
X-Runtime:
|
37
|
+
- "0.062213"
|
38
|
+
Connection:
|
39
|
+
- close
|
40
|
+
Server:
|
41
|
+
- thin 1.5.0 codename Knife
|
42
|
+
body:
|
43
|
+
encoding: US-ASCII
|
44
|
+
string: ! "[true,true]"
|
45
|
+
http_version:
|
46
|
+
recorded_at: Thu, 12 Sep 2013 22:57:05 GMT
|
47
|
+
recorded_with: VCR 2.5.0
|