Skip to content

Instantly share code, notes, and snippets.

@Phantoms
Created August 6, 2012 11:42
Show Gist options
  • Save Phantoms/3273778 to your computer and use it in GitHub Desktop.
Save Phantoms/3273778 to your computer and use it in GitHub Desktop.
mlt stuff
{
:bool => {
:must => [
{
:query_string => {
:query => "1",
:fields => [
"site_id"
]
}
},
{
:match_all => {}
},
{
:query_string => {
:query => 2,
:fields => [
:type_id
]
}
}
],
:must_not => [
{
:query_string => {
:query => "500e571900ad3b0585000260",
:fields => [
"id"
]
}
}
],
:should => [
{
:mlt_field => {
:title => {
:like_text => "lorem ipsum",
:min_term_freq => 1,
:min_doc_freq => 1,
:percent_terms_to_match => 0.6
}
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment