Skip to content

Instantly share code, notes, and snippets.

@Vineeth-Mohan
Created November 8, 2011 03:28
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 Vineeth-Mohan/1346922 to your computer and use it in GitHub Desktop.
Save Vineeth-Mohan/1346922 to your computer and use it in GitHub Desktop.
Faceting on Key-Value pair list
Index mapping
{
"public" : {
"properties" : {
"list" : {
"properties" : {
"name" : {"type" : "string"},
"link" : {"type" : "string"}
}
}
}
}
}
Sample Data
{
"list" : [
{
"name" : "ABC",
"link" : "http://ABC.com/xyz"
},
{
"name" : "CDE",
"link" : "http://CDE.com/abc"
},
{
"name" : "EFG",
"link" : "http://EFG.com/abc"
},
{
"name" : "HIJ",
"link" : "http://HIJ.com/abc"
}
]
}
Expected facet result
ABC - 1
EFG - 1
HIJ - 1
CDE - 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment