Skip to content

Instantly share code, notes, and snippets.

@jprante
Last active January 8, 2016 09:35
Show Gist options
  • Save jprante/1b26be8ddfe755e800e2 to your computer and use it in GitHub Desktop.
Save jprante/1b26be8ddfe755e800e2 to your computer and use it in GitHub Desktop.
OR query
PUT /test
POST /test/doc/_mapping
{
"properties": {
"message": {
"fielddata": {
"format": "disabled"
},
"index": "analyzed",
"omit_norms": true,
"type": "string"
}
}
}
PUT /test/doc/1
{
"message" : "foo bar 123.456.254.25 foo bar"
}
PUT /test/doc/2
{
"message" : "foo bar 456.789.242.195 foo bar"
}
PUT /test/doc/3
{
"message" : "foo bar 234.456.242.195 foo bar"
}
POST /test/_search
{
"query": {
"match": {
"message": {
"operator": "or",
"query": "123.456.254.25 456.789.242.195 234.456.242.195"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment