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,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/engines/recursion/analytics/top_queries.json?end_date=2013-05-01&start_date=2013-01-01
|
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: 400
|
21
|
+
message: Bad Request
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- ngx_openresty/1.2.7.8
|
25
|
+
Date:
|
26
|
+
- Fri, 13 Sep 2013 00:28:00 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Status:
|
34
|
+
- 400 Bad Request
|
35
|
+
X-Ua-Compatible:
|
36
|
+
- IE=Edge,chrome=1
|
37
|
+
Cache-Control:
|
38
|
+
- no-cache, private
|
39
|
+
Set-Cookie:
|
40
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTJmNDg0Y2NlMzk4MTFkYWNhZWJlYmFlMjZjZTA4MzE2BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRT6oFg9uoiHqsAAABSSIiJDJhJDEwJE1CYU9abE5nbU01T3hvMFI1Zy5Cay4GOwBU--ee8e4b90fe459f11a1ae8fee20beccf95cdb20e5;
|
41
|
+
path=/; HttpOnly; secure
|
42
|
+
X-Request-Id:
|
43
|
+
- 6684093a9fd6738cd5b178f4d93f5646
|
44
|
+
X-Runtime:
|
45
|
+
- '0.038821'
|
46
|
+
X-Rack-Cache:
|
47
|
+
- miss
|
48
|
+
body:
|
49
|
+
encoding: US-ASCII
|
50
|
+
string: ! '{"error":"The time range you specified was invalid."}'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Fri, 13 Sep 2013 00:28:00 GMT
|
53
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,48 @@
|
|
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/documents/async_bulk_create_or_update.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"documents":[{"external_id":"failed_doc","fields":[{"type":"string","name":"title"}]}]}'
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Swiftype-Ruby/1.1.1
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 202
|
21
|
+
message: Accepted
|
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
|
+
- __profilin=p%3Dt; path=/
|
31
|
+
- __profilin=p%3Dt; path=/
|
32
|
+
- _st_main_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJWRkMDY0NjI2ZTg2NTcyZDQ1OGQxNzM4MDQ0NjdjZGQyBjsAVEkiGXdhcmRlbi51c2VyLnJvbGUua2V5BjsAVFsHWwZVOhpNb3BlZDo6QlNPTjo6T2JqZWN0SWQiEVR%2BFdjOomAoqQAAAzA%3D--532fc790695e1143273b73a2e22bb1c33705b707;
|
33
|
+
path=/; HttpOnly
|
34
|
+
X-Request-Id:
|
35
|
+
- e027fc55eedde702061489a4638a8d1d
|
36
|
+
X-Runtime:
|
37
|
+
- '0.231255'
|
38
|
+
Connection:
|
39
|
+
- close
|
40
|
+
Server:
|
41
|
+
- thin 1.5.0 codename Knife
|
42
|
+
body:
|
43
|
+
encoding: UTF-8
|
44
|
+
string: '{"document_receipts":[{"id":"54821785cea2601e1b000005","external_id":"failed_doc","link":"http://localhost:3000/api/v1/document_receipts/54821785cea2601e1b000005.json","status":"failed","errors":["Missing
|
45
|
+
required parameter: value"]}],"batch_link":"http://localhost:3000/api/v1/document_receipts.json?ids=54821785cea2601e1b000005"}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Fri, 05 Dec 2014 20:37:25 GMT
|
48
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,52 @@
|
|
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/documents/async_bulk_create_or_update.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string:
|
9
|
+
'{"documents":[{"external_id":"INscMGmhmX4","fields":[{"name":"url","value":"http://www.youtube.com/watch?v=v1uyQZNg2vE","type":"enum"},{"name":"thumbnail_url","value":"https://i.ytimg.com/vi/INscMGmhmX4/mqdefault.jpg","type":"enum"},{"name":"channel_id","value":"UCTzVrd9ExsI3Zgnlh3_btLg","type":"enum"},{"name":"title","value":"The
|
10
|
+
Original Grumpy Cat","type":"string"},{"name":"category_name","value":"Pets
|
11
|
+
& Animals","type":"string"}]},{"external_id":"XfY9Dsg_DZk","fields":[{"name":"url","value":"http://www.youtube.com/watch?v=XfY9Dsg_DZk","type":"enum"},{"name":"thumbnail_url","value":"https://i.ytimg.com/vi/XfY9Dsg_DZk/mqdefault.jpg","type":"enum"},{"name":"channel_id","value":"UC5VA5j05FjETg-iLekcyiBw","type":"enum"},{"name":"title","value":"Corgi
|
12
|
+
talks to cat","type":"string"},{"name":"category_name","value":"Pets &
|
13
|
+
Animals","type":"string"}]}]}'
|
14
|
+
headers:
|
15
|
+
Accept-Encoding:
|
16
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
17
|
+
Accept:
|
18
|
+
- "*/*"
|
19
|
+
User-Agent:
|
20
|
+
- Swiftype-Ruby/1.1.1
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
response:
|
24
|
+
status:
|
25
|
+
code: 202
|
26
|
+
message: Accepted
|
27
|
+
headers:
|
28
|
+
Content-Type:
|
29
|
+
- application/json; charset=utf-8
|
30
|
+
X-Ua-Compatible:
|
31
|
+
- IE=Edge
|
32
|
+
Cache-Control:
|
33
|
+
- no-cache
|
34
|
+
Set-Cookie:
|
35
|
+
- __profilin=p%3Dt; path=/
|
36
|
+
- __profilin=p%3Dt; path=/
|
37
|
+
- _st_main_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJTRlMjk1MmVjN2M0ZTFlYWEyMDlkODZiY2VmNmZlOTQ1BjsAVEkiGXdhcmRlbi51c2VyLnJvbGUua2V5BjsAVFsHWwZVOhpNb3BlZDo6QlNPTjo6T2JqZWN0SWQiEVR%2BFdjOomAoqQAAAzA%3D--c1e57d7c1f013e03b8ddc72206de74c987f00d4b;
|
38
|
+
path=/; HttpOnly
|
39
|
+
X-Request-Id:
|
40
|
+
- f7e41df2d0d029fcc51f6481298a7069
|
41
|
+
X-Runtime:
|
42
|
+
- "1.167600"
|
43
|
+
Connection:
|
44
|
+
- close
|
45
|
+
Server:
|
46
|
+
- thin 1.5.0 codename Knife
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"document_receipts":[{"id":"54821784cea2601e1b000001","external_id":"INscMGmhmX4","link":"http://localhost:3000/api/v1/document_receipts/54821784cea2601e1b000001.json","status":"pending","errors":[]},{"id":"54821784cea2601e1b000003","external_id":"XfY9Dsg_DZk","link":"http://localhost:3000/api/v1/document_receipts/54821784cea2601e1b000003.json","status":"pending","errors":[]}],"batch_link":"http://localhost:3000/api/v1/document_receipts.json?ids=54821784cea2601e1b000001%2C54821784cea2601e1b000003"}'
|
50
|
+
http_version:
|
51
|
+
recorded_at: Fri, 05 Dec 2014 20:37:24 GMT
|
52
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,52 @@
|
|
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/documents/bulk_create.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string:
|
9
|
+
! '{"documents":[{"external_id":"INscMGmhmX4","fields":[{"name":"url","value":"http://www.youtube.com/watch?v=v1uyQZNg2vE","type":"enum"},{"name":"thumbnail_url","value":"https://i.ytimg.com/vi/INscMGmhmX4/mqdefault.jpg","type":"enum"},{"name":"channel_id","value":"UCTzVrd9ExsI3Zgnlh3_btLg","type":"enum"},{"name":"title","value":"The
|
10
|
+
Original Grumpy Cat","type":"string"},{"name":"category_name","value":"Pets
|
11
|
+
& Animals","type":"string"}]},{"external_id":"XfY9Dsg_DZk","fields":[{"name":"url","value":"http://www.youtube.com/watch?v=XfY9Dsg_DZk","type":"enum"},{"name":"thumbnail_url","value":"https://i.ytimg.com/vi/XfY9Dsg_DZk/mqdefault.jpg","type":"enum"},{"name":"channel_id","value":"UC5VA5j05FjETg-iLekcyiBw","type":"enum"},{"name":"title","value":"Corgi
|
12
|
+
talks to cat","type":"string"},{"name":"category_name","value":"Pets &
|
13
|
+
Animals","type":"string"}]}]}'
|
14
|
+
headers:
|
15
|
+
Accept:
|
16
|
+
- ! "*/*"
|
17
|
+
X-Swiftype-Client:
|
18
|
+
- elastic-app-search-ruby
|
19
|
+
X-Swiftype-Client-Version:
|
20
|
+
- 1.0.0
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
response:
|
24
|
+
status:
|
25
|
+
code: 200
|
26
|
+
message: OK
|
27
|
+
headers:
|
28
|
+
Content-Type:
|
29
|
+
- application/json; charset=utf-8
|
30
|
+
X-Ua-Compatible:
|
31
|
+
- IE=Edge
|
32
|
+
Etag:
|
33
|
+
- ! '"bb009c6dcb5c622766ad5aa1ea1562d9"'
|
34
|
+
Cache-Control:
|
35
|
+
- max-age=0, private, must-revalidate
|
36
|
+
Set-Cookie:
|
37
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTAyNzczMTcxNDQ4NTNhOTFmNzQ4ZTdmM2Q0NzgxMzExBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--e90d34cab433a83a8ed1d54094fdfb83b6c67c67;
|
38
|
+
path=/; HttpOnly
|
39
|
+
X-Request-Id:
|
40
|
+
- 6a704401ec81b3b2c8cb11fe94984c20
|
41
|
+
X-Runtime:
|
42
|
+
- "0.076536"
|
43
|
+
Connection:
|
44
|
+
- close
|
45
|
+
Server:
|
46
|
+
- thin 1.5.0 codename Knife
|
47
|
+
body:
|
48
|
+
encoding: US-ASCII
|
49
|
+
string: ! "[true,true]"
|
50
|
+
http_version:
|
51
|
+
recorded_at: Thu, 12 Sep 2013 22:15:47 GMT
|
52
|
+
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/documents/bulk_create_or_update.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"documents":[{"external_id":"failed_doc","fields":[{"type":"string","name":"title"}]}]}'
|
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJThjNDk5YmQxMTEyZTU0MDBiZmYxOTYxMGI3ZmYzODFiBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--3787337087e1f0ec731c085bbbe0bd22d2804241;
|
33
|
+
path=/; HttpOnly
|
34
|
+
X-Request-Id:
|
35
|
+
- 51c5ede927c6333db4197ef2405edd28
|
36
|
+
X-Runtime:
|
37
|
+
- "0.051252"
|
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:32:45 GMT
|
47
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,52 @@
|
|
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/documents/bulk_create_or_update.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string:
|
9
|
+
! '{"documents":[{"external_id":"INscMGmhmX4","fields":[{"name":"url","value":"http://www.youtube.com/watch?v=v1uyQZNg2vE","type":"enum"},{"name":"thumbnail_url","value":"https://i.ytimg.com/vi/INscMGmhmX4/mqdefault.jpg","type":"enum"},{"name":"channel_id","value":"UCTzVrd9ExsI3Zgnlh3_btLg","type":"enum"},{"name":"title","value":"The
|
10
|
+
Original Grumpy Cat","type":"string"},{"name":"category_name","value":"Pets
|
11
|
+
& Animals","type":"string"}]},{"external_id":"XfY9Dsg_DZk","fields":[{"name":"url","value":"http://www.youtube.com/watch?v=XfY9Dsg_DZk","type":"enum"},{"name":"thumbnail_url","value":"https://i.ytimg.com/vi/XfY9Dsg_DZk/mqdefault.jpg","type":"enum"},{"name":"channel_id","value":"UC5VA5j05FjETg-iLekcyiBw","type":"enum"},{"name":"title","value":"Corgi
|
12
|
+
talks to cat","type":"string"},{"name":"category_name","value":"Pets &
|
13
|
+
Animals","type":"string"}]}]}'
|
14
|
+
headers:
|
15
|
+
Accept:
|
16
|
+
- ! "*/*"
|
17
|
+
X-Swiftype-Client:
|
18
|
+
- elastic-app-search-ruby
|
19
|
+
X-Swiftype-Client-Version:
|
20
|
+
- 1.0.0
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
response:
|
24
|
+
status:
|
25
|
+
code: 200
|
26
|
+
message: OK
|
27
|
+
headers:
|
28
|
+
Content-Type:
|
29
|
+
- application/json; charset=utf-8
|
30
|
+
X-Ua-Compatible:
|
31
|
+
- IE=Edge
|
32
|
+
Etag:
|
33
|
+
- ! '"bb009c6dcb5c622766ad5aa1ea1562d9"'
|
34
|
+
Cache-Control:
|
35
|
+
- max-age=0, private, must-revalidate
|
36
|
+
Set-Cookie:
|
37
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWZjMDZlMjgwODhkMjBjYmExMDg2MWExZmE0MjBhZDdmBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--0d16dbc7fe243021edb77914496d4c38ef6c9234;
|
38
|
+
path=/; HttpOnly
|
39
|
+
X-Request-Id:
|
40
|
+
- 2a2a08cdc513d3c2b2f961e23096e889
|
41
|
+
X-Runtime:
|
42
|
+
- "0.052437"
|
43
|
+
Connection:
|
44
|
+
- close
|
45
|
+
Server:
|
46
|
+
- thin 1.5.0 codename Knife
|
47
|
+
body:
|
48
|
+
encoding: US-ASCII
|
49
|
+
string: ! "[true,true]"
|
50
|
+
http_version:
|
51
|
+
recorded_at: Thu, 12 Sep 2013 22:49:55 GMT
|
52
|
+
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/documents/bulk_create_or_update_verbose.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"documents":[{"external_id":"failed_doc","fields":[{"type":"string","name":"title"}]}]}'
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Swiftype-Ruby/1.0.1
|
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
|
+
- '"45d92cba10f804a2e430c32f79c06377"'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
Set-Cookie:
|
32
|
+
- _st_main_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJTI3ODQwNDI1NzU3ZWE0YjkyZDU1NzI5ZjZiMjg0NDM2BjsAVEkiGXdhcmRlbi51c2VyLnJvbGUua2V5BjsAVFsISSIJUm9sZQY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUscPIjrnQFhtAAADMA%3D%3D--67548ff009df98e934a16364aa58b29632bc2cd6;
|
33
|
+
path=/; HttpOnly
|
34
|
+
X-Request-Id:
|
35
|
+
- 525743b187eb7b876042ebc3778d6b84
|
36
|
+
X-Runtime:
|
37
|
+
- "0.156692"
|
38
|
+
Connection:
|
39
|
+
- close
|
40
|
+
Server:
|
41
|
+
- thin 1.5.0 codename Knife
|
42
|
+
body:
|
43
|
+
encoding: UTF-8
|
44
|
+
string: '["Invalid field definition: Field definition requires a ''value'' attribute"]'
|
45
|
+
http_version:
|
46
|
+
recorded_at: Thu, 16 Jan 2014 23:13:08 GMT
|
47
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,52 @@
|
|
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/documents/bulk_create_or_update_verbose.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string:
|
9
|
+
'{"documents":[{"external_id":"INscMGmhmX4","fields":[{"name":"url","value":"http://www.youtube.com/watch?v=v1uyQZNg2vE","type":"enum"},{"name":"thumbnail_url","value":"https://i.ytimg.com/vi/INscMGmhmX4/mqdefault.jpg","type":"enum"},{"name":"channel_id","value":"UCTzVrd9ExsI3Zgnlh3_btLg","type":"enum"},{"name":"title","value":"The
|
10
|
+
Original Grumpy Cat","type":"string"},{"name":"category_name","value":"Pets
|
11
|
+
& Animals","type":"string"}]},{"external_id":"XfY9Dsg_DZk","fields":[{"name":"url","value":"http://www.youtube.com/watch?v=XfY9Dsg_DZk","type":"enum"},{"name":"thumbnail_url","value":"https://i.ytimg.com/vi/XfY9Dsg_DZk/mqdefault.jpg","type":"enum"},{"name":"channel_id","value":"UC5VA5j05FjETg-iLekcyiBw","type":"enum"},{"name":"title","value":"Corgi
|
12
|
+
talks to cat","type":"string"},{"name":"category_name","value":"Pets
|
13
|
+
& Animals","type":"string"}]}]}'
|
14
|
+
headers:
|
15
|
+
Accept-Encoding:
|
16
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
17
|
+
Accept:
|
18
|
+
- "*/*"
|
19
|
+
User-Agent:
|
20
|
+
- Swiftype-Ruby/1.0.1
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
response:
|
24
|
+
status:
|
25
|
+
code: 200
|
26
|
+
message: OK
|
27
|
+
headers:
|
28
|
+
Content-Type:
|
29
|
+
- application/json; charset=utf-8
|
30
|
+
X-Ua-Compatible:
|
31
|
+
- IE=Edge
|
32
|
+
Etag:
|
33
|
+
- '"bb009c6dcb5c622766ad5aa1ea1562d9"'
|
34
|
+
Cache-Control:
|
35
|
+
- max-age=0, private, must-revalidate
|
36
|
+
Set-Cookie:
|
37
|
+
- _st_main_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJWZmYjQwMDY5M2RlZjFiNzk5NDkyNGVlYmY5MWRlODFlBjsAVEkiGXdhcmRlbi51c2VyLnJvbGUua2V5BjsAVFsISSIJUm9sZQY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUscPIjrnQFhtAAADMA%3D%3D--1b489621236a6a65bd84a0e24987078b09db855e;
|
38
|
+
path=/; HttpOnly
|
39
|
+
X-Request-Id:
|
40
|
+
- 8f984b0c4a86889b38527cde5b3cdf47
|
41
|
+
X-Runtime:
|
42
|
+
- "0.034945"
|
43
|
+
Connection:
|
44
|
+
- close
|
45
|
+
Server:
|
46
|
+
- thin 1.5.0 codename Knife
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: "[true,true]"
|
50
|
+
http_version:
|
51
|
+
recorded_at: Thu, 16 Jan 2014 23:13:08 GMT
|
52
|
+
recorded_with: VCR 2.8.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/documents/bulk_destroy.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"documents":["INscMGmhmX4","XfY9Dsg_DZk"]}'
|
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWIwZDEyODVlMmNmODIxMTc1MjBiNTM5NjliOWQxYzJiBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--e8672e5b1559fdd8875cf451cf58a8f5f867dabd;
|
33
|
+
path=/; HttpOnly
|
34
|
+
X-Request-Id:
|
35
|
+
- 64753c2ee65f4e1f64fe25f5afc63e71
|
36
|
+
X-Runtime:
|
37
|
+
- "0.193708"
|
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:17:06 GMT
|
47
|
+
recorded_with: VCR 2.5.0
|