Skip to content

Instantly share code, notes, and snippets.

@cheehoo
cheehoo / relevancysorting
Created March 28, 2014 10:09
relevancy sorting queries
{
"from" : 0,
"size" : 10,
"query" : {
"filtered" : {
"query" : {
"bool" : {
"should" : [ {
"wildcard" : {
"DISPLAY_NAME" : "love"
{
"took": 117,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 380,
{
"_shard": 3,
"_node": "P5FVdOUHSZWunPqghQKmZA",
"_index": "jdbc_dev",
"_type": "media",
"_id": "8QxnX7nhSWCVukREHUJ7IQ",
"_score": 1.6720551,
"_source": {
"DISPLAY_NAME": "Happy Talk",
"PRICE": 5,
{
"took": 28,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 244,
{
"media": {
"properties": {
"AUDIO": {
"type": "string"
},
"BILLINGTYPE_ID": {
"type": "long"
},
"CATMEDIA_CDATE": {
{
"jdbc_dev": {
"media_history": {
"properties": {
"AUDIO": {
"type": "string"
},
"BILLINGTYPE_ID": {
"type": "long"
},
"_shard": 1,
"_node": "Db5OO2IRQqKtr9dTLnM6qQ",
"_index": "jdbc_dev",
"_type": "media",
"_id": "yPz6U2iWSPCKCLVQpvd_Zw",
"_score": 1.5775237,
"_source": {
"DISPLAY_NAME": "Happier?",
"PRICE": 4,
"AUDIO": "http://musicube.thecube.my/base/preview/088/889023/889023-MP3-TT-P.mp3",
{
"media": {
"properties": {
"AUDIO": {
"type": "string"
},
"BILLINGTYPE_ID": {
"type": "long"
},
"CATMEDIA_CDATE": {
{
"took": 22,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 8,
{
"media": {
"properties": {
"AUDIO": {
"type": "string"
},
"BILLINGTYPE_ID": {
"type": "long"
},
"CATMEDIA_CDATE": {