Skip to content

Instantly share code, notes, and snippets.

@speedblue
speedblue / record.json
Last active July 19, 2017 15:20
Simple Search Record
{
"Name": "Jeff Lawson",
"Title": "CEO",
"Company": "Twilio Inc",
"Location": "San Francisco"
}
@speedblue
speedblue / articleWithSeparatedSections.json
Last active January 11, 2017 10:39
One article with four sections separated in different records
[
{
"title": "This is the title",
"summary": "article summary",
"source": "articleName"
},
{
"sectionTitle": "first section",
"text": "...",
"source": "articleName"
@speedblue
speedblue / articleWithSectionsEmbedded.json
Created January 11, 2017 10:34
One article with four sections embedded
{
"title": "This is the title",
"summary": "article summary",
"sections": [
{
"title": "first section",
"text": "..."
},
{
"title": "second section",
@speedblue
speedblue / twoRecordsWithDistinctAndDifferentFacets.json
Created December 29, 2016 14:28
Example of two records with different facets and distinct
[
{
"name": "First",
"facet": [
"A",
"B"
],
"distinctKey": "key1"
},
{
@speedblue
speedblue / WikipediaEnIndexSettings.json
Created December 28, 2016 09:47
Index Settings of the English Wikipedia
{
"attributeForDistinct": "sourceArticle",
"searchableAttributes": [
"title",
"synonyms",
"text",
"sourceArticle"
],
"customRanking": [
"desc(recordTypeScore)",
@speedblue
speedblue / WikipediaEnUnitedStatesSplit.json
Last active December 28, 2016 09:40
Four first records of the United States Wikipedia article (after split to several records)
[{
"title": "United States",
"synonyms": ["United States of America", "America", "US", "U.S.", "USA", "U.S.A.", "the landmass encompassing North America and South America America", "Americas"],
"text": "The United States of America (USA), commonly referred to as the United States (U.S.) or America, is a federal republic composed of 50 states, a federal district, five major self-governing territories, and various possessions. Forty-eight of the fifty states and the federal district are contiguous and located in North America between Canada and Mexico. The state of Alaska is in the far northwestern corner of North America, with a land border to the east with Canada and separated by the Bering Strait from Russia. The state of Hawaii is an archipelago in the mid-Pacific. The territories are scattered about the Pacific Ocean and the Caribbean Sea. Nine time zones are covered. The geography, climate and wildlife of the country are extremely diverse.\nAt 3.8million square miles (9.8million km2) and with
@speedblue
speedblue / categories.json
Created March 18, 2016 18:04
Categories with popularity (count attribute) and most popular brands in this category
This file has been truncated, but you can view the full file.
[
{
"objectID": "1",
"name": "Women",
"count": 364374,
"brands": [
{
"count": 17461,
"brand": "Chanel"
},
@speedblue
speedblue / brands.json
Created March 18, 2016 17:55
List of brands with popularity (count attribute) and associated categories
This file has been truncated, but you can view the full file.
[
{
"objectID": "Chanel",
"name": "Chanel",
"count": 17625,
"cats": [
{
"count": 3935,
"name": "Women / Bags / Handbags"
},
@speedblue
speedblue / 0_reuse_code.js
Created July 17, 2014 16:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console