Last active
August 29, 2015 14:05
-
-
Save mlangenberg/7ff16ce35992e50787f4 to your computer and use it in GitHub Desktop.
This file contains 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
{ | |
"took": 1, | |
"timed_out": false, | |
"_shards": { | |
"total": 5, | |
"successful": 5, | |
"failed": 0 | |
}, | |
"hits": { | |
"total": 1, | |
"max_score": 0.10848885, | |
"hits": [ | |
{ | |
"_index": "test", | |
"_type": "doc", | |
"_id": "1", | |
"_score": 0.10848885, | |
"_source": { | |
"tags": [ | |
"one hit tag", | |
"two foo tag", | |
"three hit tag", | |
"four foo tag" | |
] | |
}, | |
"highlight": { | |
"tags": [ | |
"one <em>hit</em> tag", | |
"three <em>hit</em> tag" | |
] | |
} | |
} | |
] | |
} | |
} |
This file contains 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
{ | |
"took": 1, | |
"timed_out": false, | |
"_shards": { | |
"total": 5, | |
"successful": 5, | |
"failed": 0 | |
}, | |
"hits": { | |
"total": 1, | |
"max_score": 0.10848885, | |
"hits": [ | |
{ | |
"_index": "test", | |
"_type": "doc", | |
"_id": "1", | |
"_score": 0.10848885, | |
"_source": { | |
"tags": [ | |
"one <em>hit</em> tag", | |
"two foo tag", | |
"three <em>hit</em> tag", | |
"four foo tag" | |
] | |
}, | |
"highlight": { | |
"tags": [ | |
"one <em>hit</em> tag", | |
"three <em>hit</em> tag" | |
] | |
} | |
} | |
] | |
} | |
} |
This file contains 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/doc/1 | |
{ | |
"tags": [ | |
"one hit tag", | |
"two foo tag", | |
"three hit tag", | |
"four foo tag" | |
] | |
} | |
GET /test/doc/_search | |
{ | |
"query": { | |
"match": { "tags": "hit"} | |
}, | |
"highlight": { | |
"fields": { | |
"tags": { "number_of_fragments": 0 } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment