This repository has been archived by the owner on Aug 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from swiftype/query-suggesetion-support
Query suggestion support
- Loading branch information
Showing
30 changed files
with
229 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
dist | ||
node_modules | ||
npm-debug.log | ||
yarn-error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
fixtures/host-2376rb.api.swiftype.com-443/query_suggestion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
POST /api/as/v1/engines/node-modules/query_suggestion | ||
authorization: Bearer api-hean6g8dmxnm2shqqiag757a | ||
content-type: application/json | ||
x-swiftype-client: swiftype-app-search-javascript | ||
x-swiftype-client-version: 2.3.0 | ||
accept: */* | ||
accept-encoding: gzip,deflate | ||
body: {\"query\":\"cat\"} | ||
|
||
HTTP/1.1 200 OK | ||
date: Tue, 29 Jan 2019 18:08:51 GMT | ||
content-type: application/json; charset=utf-8 | ||
transfer-encoding: chunked | ||
connection: close | ||
vary: Accept-Encoding, Origin | ||
status: 200 OK | ||
x-frame-options: SAMEORIGIN | ||
x-xss-protection: 1; mode=block | ||
x-content-type-options: nosniff | ||
x-ratelimit-limit: 2400 | ||
x-ratelimit-remaining: 2399 | ||
etag: W/"7bbbb718dc1cca4a9911412b186b6b3e" | ||
cache-control: max-age=0, private, must-revalidate | ||
x-request-id: 0750887ae5330b6c0234b6098f4459e8 | ||
x-runtime: 0.353357 | ||
x-swiftype-frontend-datacenter: dal05 | ||
x-swiftype-frontend-node: web01.dal05 | ||
x-swiftype-edge-datacenter: dal05 | ||
x-swiftype-edge-node: web01.dal05 | ||
|
||
{"results":{"documents":[{"suggestion":"catwalk"},{"suggestion":"catcher"},{"suggestion":"https://github.com/stuartpb/catcher"},{"suggestion":"categories"},{"suggestion":"categories for"},{"suggestion":"categories for javascript"},{"suggestion":"http://lcfrs.org/cats"},{"suggestion":"cats"},{"suggestion":"https://github.com/luciferous/cats"},{"suggestion":"cat4d"}]},"meta":{"request_id":"0750887ae5330b6c0234b6098f4459e8"}} |
30 changes: 30 additions & 0 deletions
30
fixtures/host-2376rb.api.swiftype.com-443/query_suggestion_bad_options
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
POST /api/as/v1/engines/node-modules/query_suggestion | ||
authorization: Bearer api-hean6g8dmxnm2shqqiag757a | ||
content-type: application/json | ||
x-swiftype-client: swiftype-app-search-javascript | ||
x-swiftype-client-version: 2.3.0 | ||
accept: */* | ||
accept-encoding: gzip,deflate | ||
body: {\"query\":\"cat\",\"bad\":\"option\"} | ||
|
||
HTTP/1.1 400 Bad Request | ||
date: Tue, 29 Jan 2019 18:11:16 GMT | ||
content-type: application/json; charset=utf-8 | ||
transfer-encoding: chunked | ||
connection: close | ||
status: 400 Bad Request | ||
x-frame-options: SAMEORIGIN | ||
x-xss-protection: 1; mode=block | ||
x-content-type-options: nosniff | ||
x-ratelimit-limit: 2400 | ||
x-ratelimit-remaining: 2399 | ||
vary: Origin | ||
cache-control: no-cache | ||
x-request-id: 3dc07facebb356d29cfb26e9e3d50ec0 | ||
x-runtime: 0.127407 | ||
x-swiftype-frontend-datacenter: dal05 | ||
x-swiftype-frontend-node: web01.dal05 | ||
x-swiftype-edge-datacenter: dal05 | ||
x-swiftype-edge-node: web01.dal05 | ||
|
||
{"errors":["Options contains invalid key: bad"]} |
31 changes: 31 additions & 0 deletions
31
fixtures/host-2376rb.api.swiftype.com-443/query_suggestion_with_options
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
POST /api/as/v1/engines/node-modules/query_suggestion | ||
authorization: Bearer api-hean6g8dmxnm2shqqiag757a | ||
content-type: application/json | ||
x-swiftype-client: swiftype-app-search-javascript | ||
x-swiftype-client-version: 2.3.0 | ||
accept: */* | ||
accept-encoding: gzip,deflate | ||
body: {\"query\":\"cat\",\"size\":3,\"types\":{\"documents\":{\"fields\":[\"name\"]}}} | ||
|
||
HTTP/1.1 200 OK | ||
date: Tue, 29 Jan 2019 18:14:07 GMT | ||
content-type: application/json; charset=utf-8 | ||
transfer-encoding: chunked | ||
connection: close | ||
vary: Accept-Encoding, Origin | ||
status: 200 OK | ||
x-frame-options: SAMEORIGIN | ||
x-xss-protection: 1; mode=block | ||
x-content-type-options: nosniff | ||
x-ratelimit-limit: 2400 | ||
x-ratelimit-remaining: 2399 | ||
etag: W/"b0c17abeee72f6e440978d1c979df21a" | ||
cache-control: max-age=0, private, must-revalidate | ||
x-request-id: 28aa2fbd5ee7e2cbcbb1535c9e85ecfb | ||
x-runtime: 0.314690 | ||
x-swiftype-frontend-datacenter: dal05 | ||
x-swiftype-frontend-node: web01.dal05 | ||
x-swiftype-edge-datacenter: dal05 | ||
x-swiftype-edge-node: web01.dal05 | ||
|
||
{"results":{"documents":[{"suggestion":"catwalk"},{"suggestion":"cats"},{"suggestion":"cat4d"}]},"meta":{"request_id":"28aa2fbd5ee7e2cbcbb1535c9e85ecfb"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.