Skip to content

Instantly share code, notes, and snippets.

@onkel-dirtus
Created June 7, 2012 13:19
Show Gist options
  • Select an option

  • Save onkel-dirtus/2888782 to your computer and use it in GitHub Desktop.

Select an option

Save onkel-dirtus/2888782 to your computer and use it in GitHub Desktop.
ES Cruise Search
{
"sort":
[
{
"price":
{
"order":"asc",
"missing":"_last"
}
}
],
"from":0,
"size":10,
"query":
{
"bool":
{
"must":
[
{
"term":
{
"region":"Asia"
}
},
{
"flt":
{
"fields":
[
"ports_of_call",
"region"
],
"like_text":"Tokyo"
}
},
{
"flt":
{
"fields":
[
"ports_of_call",
"region"
],
"like_text":"Barcelona"
}
}
]
}
},
"facets":
{
"cruise_line":
{
"terms":
{
"field":"cruise_line.name",
"size":50
}
},
"destination":
{
"terms":
{
"field":"region",
"size":50
}
},
"sailing_date":
{
"terms":
{
"field":"sailing_date",
"size":50
}
},
"sailing_month":
{
"terms":
{
"field":"sailing_month",
"size":50
}
},
"duration":
{
"range":
{
"field":"duration_nights",
"ranges":
[
{
"from":0,
"to":4
},
{
"from":5,
"to":7
},
{
"from":8,
"to":14
},
{
"from":15,
"to":20
},
{
"from":21
}
]
}
},
"cruise_ship":
{
"terms":
{
"field":"cruise_ship.name",
"size":50
}
},
"depart_port":
{
"terms":
{
"field":"depart_port",
"size":50
}
},
"price":
{
"range":
{
"field":"sailing_pricing.price",
"ranges":
[
{
"from":0,
"to":500
},
{
"from":501,
"to":1000
},
{
"from":1001,
"to":1500
},
{
"from":1501,
"to":2000
},
{
"from":2001
}
]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment