Skip to content

Instantly share code, notes, and snippets.

@Ry4an
Created February 18, 2014 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ry4an/9072832 to your computer and use it in GitHub Desktop.
Save Ry4an/9072832 to your computer and use it in GitHub Desktop.
curl 'http://api.swiftype.com/api/v1/public/engines/suggest.json?callback=jQuery17202572345747612417_1392736179267&q=lov&engine_key=CywzyscJAHKCwrezfzpN&search_fields%5Bactor%5D%5B%5D=name&search_fields%5Bactor%5D%5B%5D=alt_names&search_fields%5Btag%5D%5B%5D=title&search_fields%5Bseries%5D%5B%5D=title%5E4&search_fields%5Bseries%5D%5B%5D=alt_title%5E2&search_fields%5Bseries%5D%5B%5D=genre&search_fields%5Bseries%5D%5B%5D=tags&search_fields%5Bseries%5D%5B%5D=description&search_fields%5Bseries%5D%5B%5D=description_short&search_fields%5Bseries%5D%5B%5D=description_flipper_es&search_fields%5Bseries%5D%5B%5D=description_es&fetch_fields%5Bactor%5D%5B%5D=external_id&fetch_fields%5Bactor%5D%5B%5D=url&fetch_fields%5Bactor%5D%5B%5D=name&fetch_fields%5Bactor%5D%5B%5D=thumbnail&fetch_fields%5Bactor%5D%5B%5D=series_count&fetch_fields%5Btag%5D%5B%5D=external_id&fetch_fields%5Btag%5D%5B%5D=url&fetch_fields%5Btag%5D%5B%5D=title&fetch_fields%5Bseries%5D%5B%5D=external_id&fetch_fields%5Bseries%5D%5B%5D=url&fetch_fields%5Bseries%5D%5B%5D=title&fetch_fields%5Bseries%5D%5B%5D=thumbnail&fetch_fields%5Bseries%5D%5B%5D=rating&fetch_fields%5Bseries%5D%5B%5D=episodes&filters%5Bseries%5D%5Bcountries%5D=US&functional_boosts%5Bactor%5D%5Bpopularity%5D=logarithmic&functional_boosts%5Bseries%5D%5Bany_staged%5D=linear&per_page=3&_=1392736193575' -H 'Pragma: no-cache' -H 'DNT: 1' -H 'Accept-Encoding: gzip,deflate,sdch' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36' -H 'Accept: */*' -H 'Referer: http://qa.drama9.com/' -H 'Cookie: _session_id=0596ba74b5e7a5d6cefee77eb69f5f11; _ok=7816-400-10-2380; _okac=0b6030fd1f54b148fa7bf7b86edeb6fd; _okla=1; _okbk=cd4%3Dtrue%2Cvi5%3D0%2Cvi4%3D1391795767766%2Cvi3%3Dactive%2Cvi2%3Dfalse%2Cvi1%3Dfalse%2Ccd8%3Dchat%2Ccd6%3D0%2Ccd5%3Daway%2Ccd3%3Dfalse%2Ccd2%3D0%2Ccd1%3D0%2C; __utma=248344152.944983089.1389645889.1390833035.1391795766.3; __utmc=248344152; __utmz=248344152.1391795766.3.2.utmcsr=duckduckgo.com|utmccn=(referral)|utmcmd=referral|utmcct=/; mp_b9c464146766e3f904502a863d942b53_mixpanel=%7B%22distinct_id%22%3A%20%22501838c22f5276b73f000011%22%2C%22Landing%20Page%22%3A%20%22Homepage%22%2C%22%24initial_referrer%22%3A%20%22%24direct%22%2C%22%24initial_referring_domain%22%3A%20%22%24direct%22%2C%22%24search_engine%22%3A%20%22duckduckgo%22%7D; olfsk=olfsk3429640841204673; wcsid=uclzLJOLJa6EIgRz0c21e72mDUGTT0Kg; hblid=vT4a3EYca9RTXH9U0c21e72pDTDUHC88; _oklv=1391799226238%2CuclzLJOLJa6EIgRz0c21e72mDUGTT0Kg' -H 'Connection: keep-alive' -H 'Cache-Control: no-cache' --compressed
{
"errors": {
"search_fields": {
"series": [
"DocumentType 'series' does not have a field 'description_flipper_es'."
]
}
},
"info": {
"actor": {
"current_page": 1,
"num_pages": 0,
"per_page": 3,
"query": "lov",
"total_result_count": 0
},
"article": {
"current_page": 1,
"num_pages": 146,
"per_page": 3,
"query": "lov",
"total_result_count": 437
},
"series": {
"current_page": 1,
"num_pages": 84,
"per_page": 3,
"query": "lov",
"total_result_count": 251
},
"tag": {
"current_page": 1,
"num_pages": 6,
"per_page": 3,
"query": "lov",
"total_result_count": 16
}
},
"record_count": 9,
"records": {
"actor": [],
"article": [
{
"_explanation": null,
"_index": "50183c742f5276ce3f000009",
"_score": 1.2309659,
"_type": "5228c452eaa0b2de7801285b",
"_version": null,
"article_type": "Story",
"categories": "news",
"external_id": "9529",
"highlight": {
"tags": "young <em>lovers</em>",
"title": "ADORABLE: Little boy confesses his secret <em>love</em>, but will he be accepted? "
},
"id": "52e03c5a14cc8adc2800878d",
"sort": null,
"tags": "young lovers",
"title": "ADORABLE: Little boy confesses his secret love, but will he be accepted? ",
"updated_at": "2014-02-18T10:11:10Z"
},
{
"_explanation": null,
"_index": "50183c742f5276ce3f000009",
"_score": 1.0445092,
"_type": "5228c452eaa0b2de7801285b",
"_version": null,
"article_type": "Story",
"categories": "news",
"external_id": "8364",
"highlight": {
"tags": "China,<em>love</em> at first sight,true <em>love</em>",
"title": "TRUE <em>LOVE</em> or TOO MUCH? Chinese boyfriend becomes his girlfriend's chair"
},
"id": "524329f0eaa0b2912d00dd79",
"sort": null,
"tags": "China,love at first sight,true love",
"title": "TRUE LOVE or TOO MUCH? Chinese boyfriend becomes his girlfriend's chair",
"updated_at": "2014-02-18T10:12:11Z"
},
{
"_explanation": null,
"_index": "50183c742f5276ce3f000009",
"_score": 0.9847727,
"_type": "5228c452eaa0b2de7801285b",
"_version": null,
"article_type": "Story",
"categories": "news",
"external_id": "9781",
"highlight": {
"tags": "romance,<em>love</em> relationships",
"title": "Scientist says true, selfless <em>love</em> needs no flowers or chocolates"
},
"id": "52fea083eaa0b26e4b00077f",
"sort": null,
"tags": "romance,love relationships",
"title": "Scientist says true, selfless love needs no flowers or chocolates",
"updated_at": "2014-02-18T10:10:55Z"
}
],
"series": [
{
"_explanation": null,
"_index": "50183c742f5276ce3f000009",
"_score": 14.452735,
"_type": "50183c5af6b04cdd60001caf",
"_version": null,
"episodes": 1,
"external_id": "3887",
"highlight": {
"thumbnail": "/st/img/thumbs/<em>lovers_thumb.jpg</em>",
"title": "<em>Lovers</em>",
"url": "/drama/3887/<em>Lovers</em>/"
},
"id": "5019736eb27fb919470013bd",
"rating": 3.08450704225352,
"sort": null,
"thumbnail": "/st/img/thumbs/lovers_thumb.jpg",
"title": "Lovers",
"url": "/drama/3887/Lovers/"
},
{
"_explanation": null,
"_index": "50183c742f5276ce3f000009",
"_score": 14.452735,
"_type": "50183c5af6b04cdd60001caf",
"_version": null,
"episodes": 20,
"external_id": "105",
"highlight": {
"thumbnail": "/st/img/thumbs/<em>lover_thumb.jpg</em>",
"title": "<em>Lovers</em>",
"url": "/drama/105/<em>Lovers</em>/"
},
"id": "5019736eb27fb9cf46001388",
"rating": 4.35321100917431,
"sort": null,
"thumbnail": "/st/img/thumbs/lover_thumb.jpg",
"title": "Lovers",
"url": "/drama/105/Lovers/"
},
{
"_explanation": null,
"_index": "50183c742f5276ce3f000009",
"_score": 9.033077,
"_type": "50183c5af6b04cdd60001caf",
"_version": null,
"episodes": 16,
"external_id": "3943",
"highlight": {
"thumbnail": "/st/img/thumbs/greatest-<em>love</em>-thumbnail.jpg",
"title": "Greatest <em>Love</em>"
},
"id": "501972efb27fb9224700130b",
"rating": 4.61689171299974,
"sort": null,
"thumbnail": "/st/img/thumbs/greatest-love-thumbnail.jpg",
"title": "Greatest Love",
"url": "/drama/3943/Greatest_Love/"
}
],
"tag": [
{
"_explanation": null,
"_index": "50183c742f5276ce3f000009",
"_score": 1.4452734999999999,
"_type": "50296827563c3b931a003027",
"_version": null,
"external_id": "love",
"highlight": {
"title": "<em>love</em>",
"url": "/featured/tag/<em>love</em>"
},
"id": "503fd0ebb27fb9802600107b",
"sort": null,
"title": "love",
"url": "/featured/tag/love"
},
{
"_explanation": null,
"_index": "50183c742f5276ce3f000009",
"_score": 1.4452734999999999,
"_type": "50296827563c3b931a003027",
"_version": null,
"external_id": "lover",
"highlight": {
"title": "<em>lover</em>",
"url": "/featured/tag/<em>lover</em>"
},
"id": "503fd0e5f6b04cd73e000a46",
"sort": null,
"title": "lover",
"url": "/featured/tag/lover"
},
{
"_explanation": null,
"_index": "50183c742f5276ce3f000009",
"_score": 0.9033077,
"_type": "50296827563c3b931a003027",
"_version": null,
"external_id": "tough-love",
"highlight": {
"title": "tough <em>love</em>",
"url": "/featured/tag/tough-<em>love</em>"
},
"id": "50296874563c3b7e1a002fe4",
"sort": null,
"title": "tough love",
"url": "/featured/tag/tough-love"
}
]
}
}
@Ry4an
Copy link
Author

Ry4an commented Feb 19, 2014

<Ry4an> weefbellington: that gist I sent of the swiftype stuff isn't showing all the fields that exist
<weefbellington> where can Is see the additional fields?
<Ry4an> because the request is passing in 'fetch_fields' params to limit what's returned
<weefbellington> ah, OK
<Ry4an> just query the API w/o a fetch_field and you'll get them all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment