Skip to content

Instantly share code, notes, and snippets.

@lukas-vlcek
Created June 7, 2011 12:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukas-vlcek/1012115 to your computer and use it in GitHub Desktop.
Save lukas-vlcek/1012115 to your computer and use it in GitHub Desktop.
Thread by references #BBUZZ 2011
{
from : 0, size : count,
fields : [ "date", "subject", "mail_list", "message_id", "message_id_original", "from.not_analyzed", "references" ],
script_fields : {
millis : { script : "doc['date'].date.millis" }
},
query : {
constant_score : {
filter : {
or : {
filters : [
{ terms : { references : references } },
{ terms : { message_id_original : references } }
]
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment