Last active
January 8, 2016 09:35
-
-
Save jprante/1b26be8ddfe755e800e2 to your computer and use it in GitHub Desktop.
OR query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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